Commit 12362bb6 by BellCodeEditor

save project

parent 6e214726
Showing with 5 additions and 3 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)
finally:
print("-"*30) print("-"*30)
print(total) return total
new_inpot() a = new_inpot()
\ No newline at end of file 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