Commit d3f62b30 by BellCodeEditor

save project

parent e9b73f58
Showing with 4 additions and 5 deletions
def a():
total = []
while True:
while True:
try:
unit=int(input("请输入单价:"))
unit=float(input("请输入单价:"))
except:
print('请输入整数!')
else:
if unit == 'q':
if unit == 'q':
break
else:
total.append(int(unit))
total.append(float(unit))
# total[0]=total[0]+unit
print('现在总计为:'+str(total))
......
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