Commit 777ec35d by BellCodeEditor

save project

parent 0a1ec4f2
Showing with 8 additions and 3 deletions
def new_input():
A=[]
while True:
......@@ -13,5 +12,11 @@ def new_input():
else:
A.append(a)
return A
def sum(money):
s=0
for i in money:
s=s+i
return s
b= new_input()
print(b)
\ No newline at end of file
t=sum(b)
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