Commit 17bd43ad by BellCodeEditor

auto save

parent dc70412a
Showing with 23 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()
print(a[0])
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