11/13 confused


what is incorrect

shopping_list = ["banana", "orange", "apple"]

stock = {
"banana": 6,
"apple": 0,
"orange": 32,
"pear": 15

prices = {
"banana": 4,
"apple": 2,
"orange": 1.5,
"pear": 3

Write your code below!

def compute_bill(food):
for food in shopping_list:
total=+ prices(food)
return total

Thanks in advance


It would be nice if you tell us what error message do you get, for now we only have your code.
Also your code lacks proper indentation. I guess you made it right, however I can't see it. Paste your code again, highlight it and press Ctrl + Shift + C.

food is your list, so you shouldn't use it as a key .