Commit 24cc337e by BellCodeEditor

save project

parent 6e3b6af2
Showing with 8 additions and 2 deletions
def sum(money):
cdt=0
for i in money:
cdt+=i
return cdt
def new_input(): def new_input():
total = [] total = []
while True: while True:
...@@ -13,4 +18,5 @@ def new_input(): ...@@ -13,4 +18,5 @@ def new_input():
print("-"*30) print("-"*30)
return total return total
z=new_input() z=new_input()
print(z) c=sum(z)
\ No newline at end of file print("一共消费"+str(c)+"元"+"是现金还是扫码")
\ 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