Commit 2f949211 by BellCodeEditor

save project

parent 5853d929
Showing with 10 additions and 3 deletions
...@@ -11,5 +11,12 @@ def price(): ...@@ -11,5 +11,12 @@ def price():
print('请输入正确的数字。') print('请输入正确的数字。')
else: else:
total.append(money) total.append(money)
print(total) return total
price() def add(fee):
\ No newline at end of file cound = 0
for i in fee:
cound += i
return cound
a=price()
food_fee = add(a)
print('这餐总共消费金额%d' %food_fee)
\ 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