12/13 Stocking Out

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

Cannot for the life of me get this to run. I don’t understand the “Indentation error: unindent does not match” message. I have refreshed the page and created a bug report.


this two lines:

    	total = total + prices[item]
      stock[item] -= 1

the indent level doesn’t match, it should match.

Bug reports are for problems with the exercise, which doesn’t seem to be the case here


Funny thing is that indent was never showing on my screen - first thing I checked. Anyways, it works now.


i experienced problems with this as well, i will see what i can dig up :wink:


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.