Commit be35bca7 by BellCodeEditor

save project

parent 3abc22f0
Showing with 13 additions and 3 deletions
...@@ -12,5 +12,15 @@ def xiaozhuo(): ...@@ -12,5 +12,15 @@ def xiaozhuo():
else: else:
total.append(unit) total.append(unit)
print("-"*30) print("-"*30)
return(total) return total
xiaozhuo()
\ No newline at end of file
def sum(money):
count=0
for i in money:
count=count+i
return count
a=xiaozhuo()
总价=sum(a)
print("您一共花费了"+str(总价)-"元!扫码还是现金!")
\ 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