Commit ad134526 by BellCodeEditor

auto save

parent a1b9b57e
Showing with 13 additions and 3 deletions
def a():
total = []
total = []
while True:
unit= input("请输入:")
if unit== 'q':
......@@ -12,5 +12,15 @@ total = []
else:
total.append(unit)
print("-"*35)
print(total)
a()
return total
def sum(money):
count=0
for i in money:
count=count+i
return count
b=a()
pay=sum(b)
print("您一共支付了"+str(pay)+"元")
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