Keeping track of produce


#1



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]


#2

In each line, the price is singular.

'price: %s'

#3

wow! that simple! thank you for your input.


#4

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