Why does it say that code for the "orange" key doesnt work properly?


#1
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 "price:", prices[key]
    print "stock:", stock[key]

#2

Please format your post as I have done (select entire code block; press Ctrl+Shift+C) from next time. Thanks! :smile: Please post the exercise link. Thanks!


#3

lulz okay xD im sorry doe


#4

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


#5

k nvm problem solved, thanks :smiley:


#6

the problem still exists . Can you fix it. Thank you.


#7

I have had the same problem. You should write price and not prices.


#8

I have copied the same code but still the problem persists and showing the same error.Can someone please help?


#9

@scriptjumper41984 @ravik21 please create a new topic in the correct category explaining your problem, with the code you used and the exercise link. Thanks!