12/13 Stocking Out


#1
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.


#2

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


#3

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


#4

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


#5

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