求助python大神编程

2024-12-28 22:57:06
推荐回答(1个)
回答1:

你好,下面是改好的对应的代码:
age = input("your age is ")

while age:
age = int(age)
if 18 <= age:
print (" you can drive car now")
else:
print ("Sorry!")
print ("enter age or press enter to quit")
age = input("your age is ")

print ("quit")