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


#1



Hi guys,

this is my code and I get this error, dunno what to do!

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


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

an item has a price, not prices (single vs plural)

I answered this same question already today, did you read other topics?


#3

Sorry about that I just saw


#4