Jan-29-2018, 01:11 AM
Why doesn't this work in Python 3.x?
quarters = input('How many quarters do you have? ') if quarters <= 8: print ('You need more money.')I get this error from the original program here.
Error:Traceback (most recent call last):
File "house.py", line 118, in <module>
front_porch()
File "house.py", line 21, in front_porch
living_room()
File "house.py", line 106, in living_room
basement()
File "house.py", line 67, in basement
if quarters <= 8:
TypeError: '<=' not supported between instances of 'str' and 'int'