Keeping Track of the Produce :please help me this code


prices = {
    "banana": 4,
    "apple": 2,
    "orange": 1.5,
    "pear": 3
stock = {  
    "orange": 32,
    "banana": 6,
    "apple": 0,
    "pear": 15

for item in prices:
    print item
    print "prices : %s "% prices[item]
    print "stock : %s "% stock[item]

## this is my code am not getting what is the error, i keep on gettiing this message
" Oops, try again. Check what your code prints for orange. It doesn't look quite right!"


This exercise is very strict about formatting.

Your one of the o/p should look like this..

price: 1.5
stock: 32


so what modifications i should do?


You can see,that its price not prices (in the string part)?

also there is no space after the values.


where you are saying there is no space?can you please tell


After %s there is one space.


thank you :slight_smile:


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