Commit 8353f20c by BellCodeEditor

auto save

parent 1b1b23fe
Showing with 6 additions and 1 deletions
......@@ -5,7 +5,12 @@ def new_input(): # 定义函数
if unit== 'q':
break
else:
total.append(unit)
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