Commit 7140e985 by BellCodeEditor

save project

parent a5d675dc
Showing with 20 additions and 0 deletions
def new_input():
def new_input():
dzds=[]
while True:
price=input('输入价格')
if price=='q':
break
try:
price=int(price)
except:
print("请输入一个数字!")
else:
dzds.append(price)
return dzds
result=new_input()
print(result)
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