What is wrong with this:


#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!


It should print the damnable list.


prices = {
    "banana": 4,
    "apple": 2,
    "orange": 1.5,
    "pear": 3
    }
    
stock = {
        "banana": 6,
        "apple": 0,
        "orange":32,
        "pear": 15
        }
for item in prices:
        print item
        print "prices: %s" % prices[item]
        print "stock: %s" % stock[item]


#2

With each item, price is singular.


#3

Ah gotcha.

I was having that issue, but what i had fixed it I am getting a message that is saying the orange lines are weird.

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


#4

Turns out I had writen prices and not price for the print, and the program wanted it to return price.


#5

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