I have tried everything but still can't figure this out when I click submit this error code pops up.
Oops, try again. calling compute_bill with a list containing 1 apple, 1 pear and 1 banana resulted in 9 instead of the correct 7: my code is as follows
def compute_bill(food): total = 0 for item in food: if stock[item] > 0: stock[item] - 1 total += prices[item] return total
don't know what I'm doing wrong: link to problem is https://www.codecademy.com/en/courses/python-beginner-en-IZ9Ra/2/3?curriculum_id=4f89dab3d788890003000096#