Stocking out code is correct but interpreter wont accept it


#1

So I have confirmed my code is correct and the result is 5.5 like it should be, but the interpreter still tells me something not quite right. I have checked all other forums and made sure of indents and everything. What should I do?

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

#2

do not call the function, it will manipulate the stock before the exercise can validate your code


#4