Keeping Track of the Produce


Oops, try again. Check what your code prints for orange. It doesn't look quite right!

I dont know what i'm doing wrong. I've double check my code and I simply cant see where I have screwed up at. please help

Replace this line with your code. 
prices = {"banana": 4, "apple": 2, "orange": 1.5, "pear": 3}

stock = {"banana": 6, "apple": 0, "orange": 32, "pear": 15}

for key in prices:
    print key
    print "prices: %s" % prices[key]
    print "stock: %s" % stock[key]


In the instructions (#2), they give an example of how your code should display on the console:

price: 2
stock: 0

Your code displays:

prices: 2
stock: 0

Do you see the small typo in prices? You need to change the spelling in your 2nd print statement. (Check your spelling).

Compare the spelling of `prices` in your string with the one they spelled in the instructions. (2nd row in the quote... It's spelled `price`, not `prices`) Now do you see the typo?


Thank you!!!! It works


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