Commit 1e7b272f by BellCodeEditor

save project

parent a0961cbe
Showing with 6 additions and 4 deletions
...@@ -18,10 +18,12 @@ def new_input(): ...@@ -18,10 +18,12 @@ def new_input():
result=new_input() result=new_input()
print(result) print(result)
""" """
money=[15,35,40,18,54,60,25] money=[]
def sum(money): def sum(money):
p=0 p=0
for i in money: for i in money:
p=p=i p=p+i
teture(p) return p
print("您一共消费了"+p+"元!扫码还是现金呢!") price = [15,35,40,18,54,60,25]
con = sum(price)
print("您一共消费了"+str(con)+"元!扫码还是现金呢!")
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