Commit 7c83d043 by BellCodeEditor

save project

parent 6e98f292
Showing with 4 additions and 0 deletions
...@@ -6,6 +6,10 @@ def new_input(): ...@@ -6,6 +6,10 @@ def new_input():
if unit == 'q': if unit == 'q':
break break
else: else:
try:
unit=int(unit)
except:
print("请输入整数!")
total.append(unit) total.append(unit)
sum +=int(unit) sum +=int(unit)
print(total) 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