Commit 5d0254b2 by BellCodeEditor

save project

parent a6713ca8
Showing with 11 additions and 5 deletions
total = [] def sb():
total = []
try: try:
while True: while True:
unit=int(input("请输入价格:")) unit=int(input("请输入价格(按q键停止):"))
total.append(unit) total.append(unit)
except: except:
print('输入错误,请重新输入一个数字') print('输入错误,请输入一个价格')
print(total) else:
\ No newline at end of file total.append(unit)
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