Commit e0c42071 by BellCodeEditor

save project

parent 4c15c1ea
Showing with 10 additions and 4 deletions
......@@ -2,9 +2,14 @@ def new_input():
total = []
while True:
unit= input("请输入:")
if unit== 'q':
break
try:
unit= input("请输入:")
int(unit)
except:
print()
if unit== 'q':
break
print("输入错误,请输入数字。")
else:
total.append(unit)
total.append(unit)
print(total)
\ 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