Commit f133ba93 by BellCodeEditor

save project

parent 934fc0f1
Showing with 12 additions and 2 deletions
...@@ -14,5 +14,15 @@ def new_input(): ...@@ -14,5 +14,15 @@ def new_input():
total.append(unit) total.append(unit)
print("-"*30) print("-"*30)
return total return total
def sum(money):
count=0
for i in money:
count=count+i
return count0
pay=sum(price)
result=new_input() result=new_input()
print(result) print(result)
\ No newline at end of file print("你一共消费"+sty(pay)+"yuan!")
\ 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