Keeping Track of the Produce


#1



https://www.codecademy.com/courses/python-beginner-en-IZ9Ra/1/3?curriculum_id=4f89dab3d788890003000096

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]


#2

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

apple
price: 2
stock: 0

Your code displays:

apple
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?

#4

Thank you!!!! It works


#5

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