Commit 766286c0 by BellCodeEditor

save project

parent cb7dd285
Showing with 6 additions and 4 deletions
......@@ -2,13 +2,14 @@ def new_input():
turtle = []
while True:
price = input("请输入价格:")
if price == 'q':
break
try:
int(price)
price=int(price)
except:
print()
print("请重新输入价格")
else:
if price == 'q':
break
turtle.append(price)
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