Commit 23a323a9 by BellCodeEditor

save project

parent 2ea0f570
Showing with 5 additions and 4 deletions
...@@ -7,7 +7,7 @@ def sb(): ...@@ -7,7 +7,7 @@ def sb():
except: except:
print('输入错误,请输入一个价格') print('输入错误,请输入一个价格')
else: else:
print("%"*50) pass
print(total) print(total)
return total return total
...@@ -15,7 +15,8 @@ def sum(fb): ...@@ -15,7 +15,8 @@ def sum(fb):
count = 0 count = 0
for i in fb: for i in fb:
count = count + i count = count + i
print(count) return count
nb = sb() nb = sb()
sum(nb) sum(nb)
\ No newline at end of file print('您一共消费了'+str(count)+'元!扫码还是现金呢?')
\ 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