Project question | SoloLearn: Learn to code for FREE!


Project question

I'm working on a little test code but keep getting operator errors due to my if statement conditions. what's the error I'm making here? total = input("What is your shopping total?") if (total > 1000): discount = total * 0.1 truetotal = total - discount print (truetotal) else: print (total)

10/24/2018 1:36:56 PM

Fowler Myles

2 Answers

New Answer


input in Python is automatically string format, so you first need to convert it to a real number with int(total) or float(total).


thanks so much Shifu