Commit 3003af75 by BellCodeEditor

save project

parent e20ec135
Showing with 11 additions and 1 deletions
......@@ -5,6 +5,11 @@ def new_input():
if writ=="q":
break
else:
try:
unit=int(writ)
except:
print("请重新输入一个菜名")
else:
total.append(writ)
print(total)
print("~"*30)
new_input()
\ No newline at end of file
......@@ -2,4 +2,7 @@ try:
age = int(input("你今年几岁?"))
except:
print("要输整数啊")
else:
if age < 18:
print("不可以喝酒")
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