Commit 4611d670 by BellCodeEditor

save project

parent 9e1b67d3
Showing with 9 additions and 0 deletions
...@@ -7,3 +7,11 @@ def new_input(): ...@@ -7,3 +7,11 @@ def new_input():
else: else:
total.append(unit) total.append(unit)
print(total) print(total)
try:
age = int(input("你今年几岁?"))
except:
print("要输入数字啊!")
else:
if age < 18:
ptint("不可以喝酒哟")
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