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] stock[item]-=1 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