Commit db8a1e97 by BellCodeEditor

auto save

parent 835e9b15
Showing with 27 additions and 0 deletions
def diancai():
total = []
while True:
unit=input("请输入菜!")
if unit== 'q':
break
else:
try:
unit=int(unit)
except:
print("请输入数字!")
else:
total.append(unit)
return total
a=diancai()
t=0
for i in a:
t=t+int(i)
print(t)
try:
a=int(input("你今年几岁啊?"))
except:
print("请输入整数!")
print("好!")
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