Commit a64f793e by BellCodeEditor

save project

parent fe80b61a
Showing with 16 additions and 0 deletions
...@@ -5,6 +5,12 @@ def mom_input(): ...@@ -5,6 +5,12 @@ def mom_input():
if unit== 'q': if unit== 'q':
break break
else: else:
try:
unit = int(unit)
except:
print('请重数')
else:
total.append(unit) total.append(unit)
print('-'*30)
print(total) print(total)
mom_input() mom_input()
\ No newline at end of file
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