Help with 12/13


I can't figure out what's wrong with my code. Can anyone help?

def compute_bill(food):
   total = 0
   for item in food:
        if stock[item] > 0:
            total += prices[item]
            return total

I keep getting this error:
Oops, try again. calling compute_bill with a list containing 1 apple, 1 pear and 1 banana resulted in 4 instead of the correct 7

Thank you!


Never mind, I fixed it! I decreased the indent on the "return total" by 2 tabs.