Can anyone tell me why my line 4 isn't working. Every time I type in anything more than 20 it still comes up with a one pound voucher.
You are viewing a single comment. View All
If you test the "20" condition first, it fixes your problem and makes the logic simpler and easier to read.
money = float(input("How much money have you spent today?")) if money > 20: print ("you are entitled to a 3 pound voucher to spend next time you come in the store") elif money > 10: print ("you are now entitled to a 1 pound voucher to spend next time you come in the Store") else: print ("Have a nice day.")