Stuckkkkkkk! Help me~


#1

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

Show : Check what your code prints for orange. It doesn't look quite right!

What does that mean?


#2

Your formatting is off. At:
print "price %s" % prices[key]
print "price %s" % stock[key]

supposed to be
print key
print "price: %s"%prices[key]
print "stock: %s" %prices[stock]