Commit eb6ff489 by BellCodeEditor

auto save

parent e35c5e2f
Showing with 28 additions and 0 deletions
try:
age=int(input("输入您的年龄:"))
except :
print("请输入一个整数")
else:
if age <18:
print("不可以喝酒")
else:
print("饮酒要适度")
finally:
print(1)
def score():
total = []
while True:
try:
unit= int(input("请输入:"))
except:
print("请输入一个整数")
else:
if unit== "q":
break
else:
total.append(unit)
print(total)
score()
\ 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