Commit 29623c27 by BellCodeEditor

save project

parent 5394235a
Showing with 4 additions and 2 deletions
...@@ -3,8 +3,10 @@ def new_input(): ...@@ -3,8 +3,10 @@ def new_input():
while True: while True:
unit= input("请输入:") unit= input("请输入:")
if unit== 'q': try:
break int(unit)
except:
print('要输入整数哦')
else: else:
aaa.append(unit) aaa.append(unit)
print(aaa) print(aaa)
......
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