Need help: Keeping track of the product


#1

I need help for solving this exercise. My code prints for orande, not apple. I do not know why and where my code is wrong. Hope someone help me.
The below is my code.

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 "prices: %s" % prices['apple']
print "stock: %s" % stock['apple']

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


#2

a product has a price, not prices (price:)


#3

dont give space between "price" and ":"


#4

there isn't a space, so its fine?


#5

I understand why I did not get right answer.
Finally I can get correct one.
Thanks for your help!!


#6