Commit 5ec207d0 by BellCodeEditor

save project

parent 2aec911d
Showing with 10 additions and 3 deletions
......@@ -14,6 +14,14 @@ def new_input():
print("-"*40)
return total
def sum(money):
count=0
for i in money:
count=count+i
return count
new_input()
#print(new_input())
\ No newline at end of file
price=new_input()
cost=sum(price)
print("您一共消费了"+str(cost)+"元!")
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