Commit 535afbd8 by BellCodeEditor

save project

parent bcb807a3
Showing with 10 additions and 7 deletions
......@@ -13,9 +13,12 @@ def new_input():
total.append(money)
finally:
print("-"*30)
def sum(money):
count=0
for i in money:
count=count+1
return count
print("你一共消费"+str(count)+"现金还是扫码")
\ No newline at end of file
return total
def sum(money):
count=0
for i in money:
count=count+i
return count
price=new_input()
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