Commit 571f41eb by BellCodeEditor

save project

parent 191b38d0
Showing with 48 additions and 1 deletions
try:
age=int(input("你今年多少岁?"))
except:
print('要输入整数')
else:
print('通过')
print('程序结束了')
...@@ -6,7 +6,13 @@ def new_input(): ...@@ -6,7 +6,13 @@ def new_input():
if unit== 'q': if unit== 'q':
break break
else: else:
total.append(unit) try:
dff=int(unit)
except:
print("请输入数字")
else:
total.append(unit)
print(total) print(total)
new_input() new_input()
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