Commit ebfafdae by BellCodeEditor

auto save

parent d2d76c93
Showing with 12 additions and 3 deletions
...@@ -2,7 +2,7 @@ def store(): ...@@ -2,7 +2,7 @@ def store():
total = [] total = []
while True: while True:
money = input("请输入(q退出):") money = input("请输入(q退出):")
if money == 'q' if money == 'q':
break break
else: else:
try: try:
...@@ -13,5 +13,13 @@ def store(): ...@@ -13,5 +13,13 @@ def store():
total.append(money) total.append(money)
print("滚"*30) print("滚"*30)
return total return total
return = store() price = store()
print(result)
def sum(money):
count = 0
for i in money:
count = count + i
return count
pay = sum(price)
print("你一共消费" + str(pay) + "元!扫码还是付现金呢?")
\ 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