Check what your code prints for orange. It doesn't look quite right!


#1

Oops, try again. Check what your code prints for orange. It doesn't look quite right!

prices = {
"banana": 4,
"apple": 2,
"orange": 1.5,
"pear": 3
}
stock = {
"banana": 6,
"apple": 0,
"orange": 32,
"pear": 15
}
for key in prices:
print key
print "Price: %s" % prices[key]
print "Stock: %s" % stock[key]


8. Keeping track of the produce: Orange error
#2

Hi @bytesurfer15551 ,

The instructions ask for this output format ...

apple
price: 2
stock: 0

... but you have this ...

apple
Price: 2
Stock: 0

There are small but essential differences. The same is true for orange and all the other items.


#3

you should not the difference there. its the lowercase 'price' and 'stock' and your capitalize 'Price' and 'Stock'.
Make your price and stock lowercase it will work.:sunglasses:


#4

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