Commit 18a983d4 by BellCodeEditor

save project

parent 52799e04
Showing with 19 additions and 0 deletions
total = []
def sum_price():
tmp=""
while True:
tmp=input("请输入:")
try:
unit=int(tmp)
except:
if tmp== 'q':
break
else:
print("输入数字,价格为数字")
else:
total.append(unit)
print(total)
sum_price()
\ 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