Commit 86fa8580 by BellCodeEditor

save project

parent 8f264af8
Showing with 4 additions and 8 deletions
...@@ -2,15 +2,12 @@ def new_input() ...@@ -2,15 +2,12 @@ def new_input()
total = [] total = []
while True: while True:
unit= input("请输入:") unit= input("请输入:")
try:
if unit== 'q': if unit== 'q':
break break
else: else:
total.append(unit) total.append(unit)
except:
print("输入整数")
else:
print(total) print(total)
try:
new_input()
except:
print("要输入整数奥")
else:
print(total)
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