A problem with Oranges


#1

I'm not sure what exactly I'm doing wrong. Everything looks correct to me.
`


#2

Exactly the same problem with mine. It looks fine but it keeps saying that there's a problem with orange. I suspect it's something to do with the fact that the price for orange isn't an integer or something :-/


#3

That's the only thing I can think of. Either that or the way it is outputting the data since it is outputting orange first even though its not the first in my list. But I wouldn't think that should cause an issue since it still has the information correct.


#4

I found the problem!!

You and I both had:
print "Price: %s" % prices[key]
print "Stock: %s" % stock[key]

It needs to be this:
print "price: %s" % prices[key]
print "stock: %s" % stock[key]

Basically, it's case sensitive. Changing the case fixed the problem for me.

Hope that helps


#5

That was it! Thank you! I wouldn't have thought to try changing that on my own.


#6

No problem! I eventually had to skip it and move on to the other exercises but it kept bugging me.
Don't forget to mark my comment as the solution so your question appears as 'solved'

:slight_smile:


#7

Hi, I have the same problem how do you skip it?, because I canĀ“t follow to the next exercise and this is annoying me


#8

Great, thank you, I spent the last 24hours thinking about this exercise. It was so simple that I would have never thought about it myself. thank you.


#9

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