Commit 064c3c58 by BellCodeEditor

save project

parent 5e8702a6
Showing with 12 additions and 0 deletions
#创建让用户输入年龄,如果大于18岁,可以喝酒,小于18岁不能喝酒
#输入了拼音 控制台输出,请输入数字
try:
age=int(input("请输入你的年龄:"))
except:
print("请输入数字噢")
else:
if age>=18:
print("已满18岁,可以喝酒")
else:
print("未满18岁,不能喝酒")
\ 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