May-15-2020, 11:50 AM
hi im lerninig this cheapter about while loop , and trying to get out from the loop ,
the excrice was to build a tikeat progrem , this what i have done .
the excrice was to build a tikeat progrem , this what i have done .
active = True while active: message = input("what age you are") ticket = int(message) if ticket <= 4: print("you can enter freely becuse your samell") elif ticket <=13: print("the ticket will be for you 10$") elif ticket >= 12: print("the ticket will be for you 15$") elif ticket == "quit": active = Falseand when im trying to wuit the program it writing the next erorer
Error:Traceback (most recent call last):
File "C:\Users\alex8\Documents\python\python _work.py\Chpter 6\moive.py", line 5, in <module>
if ticket <= 4:
TypeError: '<=' not supported between instances of 'str' and 'int'
thanks for the help