What's wrong with my oranges?


#1



8. Keeping Track of the produce


I think my code is OK and I get the output I'm expecting but I also get the message:
Oops, try again. Check what your code prints for orange. It doesn't look quite right!

I can't see anything wrong with it - what am I missing?


#dictionary storing the prices of fruit
prices = {
    'banana':4,
    'apple':2,
    'orange':1.5,
    'pear':3
    }
    
#dictionary storing the stock values
stock = {
    'banana':6,
    'apple':0,
    'orange':32,
    'pear':15
    }
#looping through all the fruit in the two dictionaries writing out the key along
#with its price and stock level.  

for fruit in prices:
    print "%s" %fruit
    print "price: %s " % prices[fruit]
    print "stock: %s " % stock[fruit]


#2

you have a space after the %s placeholder for price and stock. This is not allowed i am afraid


#3

Many thanks - sorted!


#4