Commit 8353f20c by BellCodeEditor

auto save

parent 1b1b23fe
Showing with 5 additions and 0 deletions
......@@ -5,6 +5,11 @@ def new_input(): # 定义函数
if unit== 'q':
break
else:
try:
unit = int(unit) #转换成整数
except:
print("请输入一个整数!")
else:
total.append(unit)
print(total)
......
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