Commit 16d9cde1 by BellCodeEditor

save project

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