Commit 8916bf7c by BellCodeEditor

save project

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