我正在做一本书的作业,但无法解决问题:
'<' not supported between instances of 'str' and 'int'
我的代码是:
message = 'How old are you?: '
message += "\nType 'quit' for exit: "
age = int(input(message))
if age < 3:
price = 0
elif age >= 3 and age < 12:
price = 10
else:
price = 15
print("Bilet cost: " + str(price) + "$")