Commit 0fae2445 by BellCodeEditor

save project

parent 60a73302
Showing with 7 additions and 2 deletions
...@@ -4,10 +4,15 @@ def new_input(): ...@@ -4,10 +4,15 @@ def new_input():
try: try:
unit= int(input("请输入:")) unit= int(input("请输入:"))
except: except:
print("sb") print("sb")
else:
if unit== 'q': if unit== 'q':
break break
else:
try:
unit = int( unit )
except:
print("请输入数字")
else:
total.append(unit) total.append(unit)
print(total) print(total)
new_input() new_input()
......
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