Commit 8d0b2b32 by BellCodeEditor

save project

parent 08157ce7
Showing with 7 additions and 2 deletions
......@@ -14,5 +14,11 @@ def new_input():
finally:
print('-'*30)
return total
def sum(money):
c=0
for i in money:
c=c+i
return c
result=new_input()
print(result)
\ No newline at end of file
pay=sum(result)
print("您一共消费了"+str(pay)+"元")
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