Problem to pass dictionary with orange


Hi, I am Luz Adriana from Colombia, If somebody can help me? I don´t understand what is the problem in this code:

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: %s" % prices[key]
    print "Stock: %s" % stock[key]

the error message is:

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

thank for your help


Try it with lowercase price and stock:
print "price: %s" % prices[key]
print "stock: %s" % stock[key]

Hope it helps :smiley:


Hi frozentofu, thanks! yes it was the problem! the uppercases!