Commit 401addba by BellCodeEditor

save project

parent 36e4e002
Showing with 9 additions and 2 deletions
...@@ -12,5 +12,12 @@ def caidan(): ...@@ -12,5 +12,12 @@ def caidan():
else: else:
t.append(a) t.append(a)
return t return t
def sum(money):
c=0
for i in money:
c=c+i
return c
b=caidan() b=caidan()
print(b) d=sum(b)
\ No newline at end of file print("您一共需要支付"+str(d)+"元")
print("_"*30)
\ 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