Commit 584fcc8f by BellCodeEditor

save project

parent 6d88eca4
Showing with 18 additions and 0 deletions
def sb():
total = []
try:
while True:
unit=int(input("请输入价格(按q键停止):"))
total.append(unit)
except:
print('输入错误,请输入一个价格')
else:
total.append(unit)
print("%"*50)
print(total)
return total
nb = sb()
for i in nb:
print(i)
\ 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