Commit e65441db by BellCodeEditor

auto save

parent 7586d54d
Showing with 10 additions and 0 deletions
...@@ -5,6 +5,13 @@ def new_input(): ...@@ -5,6 +5,13 @@ def new_input():
if unit== 'q': if unit== 'q':
break break
else: else:
try:
unint = int(unit)
except:
print("输鏴数字")
else:
totalappend(unit)
print("-"*30)
total.append(unit) total.append(unit)
print(total) print(total)
new_input() new_input()
......
...@@ -2,4 +2,7 @@ try: ...@@ -2,4 +2,7 @@ try:
age = int(input('几岁')) age = int(input('几岁'))
except: except:
print('输整数') print('输整数')
else:
if age < 18:
print('不喝酒弄死你')
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