Commit 1aa50ba1 by BellCodeEditor

save project

parent 5dc8d7d7
Showing with 5 additions and 4 deletions
...@@ -2,12 +2,13 @@ def func(): ...@@ -2,12 +2,13 @@ def func():
total = [] total = []
while True: while True:
try: try:
unit=int(input("请输入:")) unit=int(input("请输入:"))
except: except:
print("要输入整数") if unit=='q':
if unit== 'q': print("结束")
break break
else: print()
else
total.append(unit) total.append(unit)
print(total) 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