Commit 1ee22f8c by BellCodeEditor

auto save

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