A day at the supermarket - orange error



prices = {
"banana" : 4,
"apple" : 2,
"orange" : 1.5,
"pear" : 3,

for price in prices:
print prices[price]

stock = {
"banana" : 6,
"apple" : 0,
"orange" : 32,
"pear" : 15,
for key in prices:
print 'price: %s' % prices[key]
print 'stock: %s' % stock[key]
I keep getting the error message "Oops: try again. Check what your code prints for orange. It doesnt look quite right.


The instructions include ...

Like the example above, for each key, print out the key along with its price and stock information.

Your code outputs the price and stock information. But does it first print out the key?


Hello. I'll send you my code. I had the same problem.
for x in prices:
print x
print 'price: %s' % prices[x]
print 'stock: %s' % stock[x]


I am also having the same problem.


I was not printing the key and I had an additional print statement included. Thanks for the suggestion. I'm all good now. Thanks dimpata.


Check out dimpata's suggestion.


I was not printing out the key. Thanks.