Commit 918f967d by BellCodeEditor

save project

parent 61532cc7
Showing with 12 additions and 3 deletions
def est_4():
def price():
total = []
while True:
unit= input("请输入:")
......@@ -12,4 +12,13 @@ def est_4():
total.append(unit)
return total
print(est_4())
\ No newline at end of file
def sum(money):
count =0
for i in money:
count=count+i
return count
# price=est_4()
pay = sum(price())
print("你一共消费了"+str(pay)+"元,扫码还是现金")
\ 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