Commit 246639e0 by BellCodeEditor

save project

parent 7710d1cf
Showing with 13 additions and 2 deletions
...@@ -6,7 +6,11 @@ def total(): ...@@ -6,7 +6,11 @@ def total():
if unit== 'q': if unit== 'q':
break break
else: else:
total.append(unit) try:
a=int(unit)
except:
print("请重新输入")
else:
total.append(a)
print(total) print(total)
total() total()
\ No newline at end of file
def 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