Keeping track of produce


Exercise: 10. A day at the Supermarket - keeping track of produce.

The code prints to the console correctly. However, its returning with an error stating: 'check what your code prints for orange. it doesn't look right!' I need some further guidance on this...

prices = {"banana":4, "apple":2, "orange":1.50, "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]


In each line, the price is singular.

'price: %s'


wow! that simple! thank you for your input.


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