Commit de01a341 by BellCodeEditor

save project

parent 1e997009
Showing with 8 additions and 2 deletions
...@@ -12,7 +12,13 @@ def func(): ...@@ -12,7 +12,13 @@ def func():
else: else:
total.append(unit) total.append(unit)
return total return total
def sun(unit):
count=0
for i in unit:
count=count+i
return count
result=func() price=func()
print(result) pay=sun(price)
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