Keeping track of produce: confused as to why code is not working


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

Not working, despite being fairly certain I am correct. Help?

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]


a product has a price, not prices


Thank you. Kind of annoying how specific that is, but still, thank you.


Agree, but on a website, if you where to build a shop, prices would be weird. attention to detail is important in programming. Designing the new facebook logo a few years ago took thousands of man hours :stuck_out_tongue: