Keep Track of the Produce


#1



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


Error Message I get:

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


Where is my mistake? I can't really see it.

Thank you so much! :slight_smile:


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

make sure the output is an exact match to the example (case sensitive)

does the example use prices: or price:? and which one do you use?


#3

Wow, thank you very much. it really was the case sensitivity. I turned the 'P' in Prices and 'S' in Stock into lower case. And Prices to price.

Now it works well..


#4

#5

the exercise wasn't lying when it said: exact match, as you discovered