May-03-2021, 03:21 PM
Is this assignment actually worded like that? The text says you get a discount "on pear" when you buy MORE than 10 melons but the example code only buys 10 melons so it never triggers the discount. Did you mean "10 or more"? Also, it reads like you get discount on any amount of pears after you buy 10 melons. Seems like you should only get a discount on ONE pear for every 11 (or is it 10?) melons. That's a bit more complicated to code so make sure you're explaining the question correctly.
And where can you buy pears cheaper than melons anyway???
And where can you buy pears cheaper than melons anyway???