Commit ebe880e7 by BellCodeEditor

save project

parent cce1b129
Showing with 17 additions and 9 deletions
def new_input():
a=[]
while True:
a=input("请输入年龄")
if a=="q":
break
try:
a=int(a)
except:
print("请输入数字")
else:
if a<18:
print("不能喝酒")
else:
print("去喝酒吧")
print("程序结束")
new_input()
while True:
try:
a=int(input("请输入年龄"))
except:
print("请输入数字")
else:
if a<18:
print("你不能喝酒")
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment