Commit 8916bf7c by BellCodeEditor

save project

parent 888ccf83
Showing with 10 additions and 12 deletions
total = []
def aaa():
while True:
unit= input("请输入:")
if unit== 'q':
s= input("请输入:")
if s== 'q':
break
else:
total.append(unit)
try:
s=int(s)
except:
print('请输入整数')
else:
total.append(unit)
print(total)
try:
s=int(input('你今年几岁了?'))
except:
print('请输入整数')
else:
if s<18:
print('你不能喝酒')
\ No newline at end of file
aaa()
\ 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