Commit 47fc501b by BellCodeEditor

save project

parent 326d2604
Showing with 3 additions and 2 deletions
...@@ -20,14 +20,15 @@ def ert(price): ...@@ -20,14 +20,15 @@ def ert(price):
sum=0 sum=0
for i in price: for i in price:
sum+=i sum+=i
return sum
print("==========================================") print("==========================================")
print(price) print(price)
print('我下面开始计算菜单的总价') print('我下面开始计算菜单的总价')
sum=ert(price) su=ert(price)
print('菜单的总价格为:'+str(ert)) print('菜单的总价格为:'+str(su))
# ''' # '''
# 思路: # 思路:
# 遍历得到列表中的每个值,然后让他们相加 # 遍历得到列表中的每个值,然后让他们相加
......
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