Commit 8fb1571a by BellCodeEditor

save project

parent ec90d2da
Showing with 6 additions and 5 deletions
...@@ -3,12 +3,12 @@ def new_input(): ...@@ -3,12 +3,12 @@ def new_input():
while True: while True:
try: try:
unit=int(input("请输入:")) unit=int(input("请输入:"))
if unit== 'q':
break
except: except:
print("请输入整数") print("请输入整数")
else: if unit== 'q':
total.append(unit) break
print(total) else:
total.append(unit)
print(total)
price=new_input() price=new_input()
print(price) print(price)
\ 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