Commit 0e277ce0 by BellCodeEditor

save project

parent bbc96b0f
Showing with 10 additions and 4 deletions
...@@ -12,6 +12,12 @@ def cd(): ...@@ -12,6 +12,12 @@ def cd():
else: else:
total.append(unit) total.append(unit)
print(30*'-') print(30*'-')
print(total) return total
def sum(money):
cd() count=0
\ No newline at end of file for i in money:
count=count+i
return count
price=cd()
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