Commit 410613e5 by BellCodeEditor

save project

parent 1de90f52
Showing with 9 additions and 1 deletions
......@@ -5,6 +5,13 @@ def new_input():
if unit== 'q':
break
else:
total.append(unit)
try:
unit=int(unit)
except ValueError:
print("必须是数字")
except Exception as e:
print("其他错误:"+str(e))
else:
total.append(unit)
return total
print(new_input())
\ No newline at end of file
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