Commit 12362bb6 by BellCodeEditor

save project

parent 6e214726
Showing with 6 additions and 4 deletions
...@@ -4,6 +4,7 @@ def new_inpot(): ...@@ -4,6 +4,7 @@ def new_inpot():
unit= input("请输入:") unit= input("请输入:")
if unit== 'break': if unit== 'break':
break break
else: else:
try: try:
unit = int(unit) unit = int(unit)
...@@ -11,6 +12,8 @@ def new_inpot(): ...@@ -11,6 +12,8 @@ def new_inpot():
print("请重新输入一个数字!") print("请重新输入一个数字!")
else: else:
total.append(unit) total.append(unit)
print("-"*30) finally:
print(total) print("-"*30)
new_inpot() return total
\ No newline at end of file a = new_inpot()
print(a)
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