Commit 2bc633c9 by BellCodeEditor

save project

parent 1416eb1c
Showing with 10 additions and 5 deletions
...@@ -2,8 +2,13 @@ def new_input(): ...@@ -2,8 +2,13 @@ def new_input():
turtle = [] turtle = []
while True: while True:
price = input("请输入价格:") price = input("请输入价格:")
if price == 'q': try:
break int(price)
except:
print()
else: else:
turtle.append(price) if price == 'q':
print(turtle) break
\ No newline at end of file else:
turtle.append(price)
print(turtle)
\ 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