Commit eeb3932c by BellCodeEditor

save project

parent 4913b709
Showing with 3 additions and 3 deletions
......@@ -2,15 +2,15 @@ def new_input():
total = []
sum = 0
while True:
try:
unit= input("请输入:")
if unit== 'q':
break
else:
try:
unit=int(unit)
except:
print("请输入整数!")
else:
if unit=='q':
break
total.append(unit)
sum +=int(unit)
print(total)
......
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