Commit e73b2b45 by BellCodeEditor

save project

parent eb9c2ae8
Showing with 23 additions and 5 deletions
try:
a = int(input("你今年几岁了"))
except:
print("要输入整数")
else:
if a < 18:
print("禁止饮酒")
print("结束")
def ssss(): def os():
total = [] total = [15]
while True: while True:
unit= input("请输入:") unit = input("请输入(退按Q):")
if unit== 'q': if unit== 'q':
break break
else: else:
try:
unit = int(unit)
except:
print('输错了,输一个整数')
else:
total.append(unit) total.append(unit)
print(total)q print('-'*30)
ssss() print(total)
os()
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