Commit 8d5649b6 by BellCodeEditor

save project

parent c705b635
Showing with 8 additions and 5 deletions
...@@ -15,10 +15,12 @@ def cnmdm(): ...@@ -15,10 +15,12 @@ def cnmdm():
print('-'*30) print('-'*30)
return total return total
def sum(money):
count = 0
for i in money:
count = count + i
return count
price = cnmdm() price = cnmdm()
pay = sum(price) pay = sum(price)
print('您一共消费了' + str(pay) + '元!扫码还是现金?') print('您一共消费了' + str(pay) + '元!扫码还是现金?')
\ No newline at end of file
result = cnmdm()
print(result)
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