K .2,356 Points
Couldn't the first if statement in the price method be changed to just quantity > 100? not quantity >= 100??
Since the second if statement runs if the input is 100?
KRIS NIKOLAISEN54,287 Points
If you are taking about this code:
def price(quantity) if quantity >= 100 price_per_unit = 8 end if quantity >=50 && quantity < 100 price_per_unit = 9 end end
The following runs if quantity is less than 100 and greater than or equal to 50 but not equal to 100
if quantity >=50 && quantity < 100
You can see this @7:55 in the video when a value of 100 is entered and the total is $800