8. Keeping Track Of Produce help


Hello all! I've been working on this for a pretty long time and I am kind of stuck. Could you please explain what I've done wrong?

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


Study the instructions to find out what the output should be. Compare to your own.


Thanks ionatan! That helped a lot. :slight_smile:


print "price: %s" % prices[key]
print "stock: %s" % stock[key]

there is space blank before %s


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