Commit 777ec35d by BellCodeEditor

save project

parent 0a1ec4f2
Showing with 8 additions and 3 deletions
def new_input(): def new_input():
A=[] A=[]
while True: while True:
...@@ -13,5 +12,11 @@ def new_input(): ...@@ -13,5 +12,11 @@ def new_input():
else: else:
A.append(a) A.append(a)
return A return A
def sum(money):
s=0
for i in money:
s=s+i
return s
b= new_input() b= new_input()
print(b) t=sum(b)
\ No newline at end of file print("您一共消费"+str(t)+"元!扫码还是现金?")
\ 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