Commit 52e16c3e by BellCodeEditor

save project

parent 8da6dfca
Showing with 4 additions and 1 deletions
...@@ -6,10 +6,12 @@ def new_input(): ...@@ -6,10 +6,12 @@ def new_input():
break break
else: else:
try: try:
tolal.append(int(unit)) unit= int(unit)
except: except:
print("输入错误,请重新输入一个数字") print("输入错误,请重新输入一个数字")
else: else:
tolal.append(unit)
finally:
print("-"*30) print("-"*30)
print(tolal) print(tolal)
new_input() 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