Commit b135f8f8 by BellCodeEditor

auto save

parent 631a1889
Showing with 5 additions and 2 deletions
...@@ -2,11 +2,14 @@ def new_input(): ...@@ -2,11 +2,14 @@ def new_input():
e = [] e = []
while True: while True:
q= input("请输入:") q= input("请输入:")
if q== 'q': if q== 'q':
break break
try:
q=int(q)
except:
print("请输入一个数字!")
else: else:
total.append(unit) total.append(q)
print(e) print(e)
......
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