Something wrong with orange


Can you help me find what is wrong with orange?

The example is:

price: 2
stock: 0

and my code outputs:

price: 1.5
stock: 32
price: 3
stock: 15
price: 4
stock: 6
price: 2
stock: 0


The output is okay to understand your problem, but please share your code my friend! (:


for o in prices:
    print o
    print 'price:', prices[o]
    print 'stock:', stock[o]


anyone ever figure this out, I have the same output/error

Here's the code"

prices = {





stock = {





for key in prices:

print key
print "Price: %s" % prices[key]
print "Stock: %s" % stock[key]


Capitalization is important


I found a way to make it work.

The exercise requires use of % even though it is only a suggestion in the instructions.

i.e. This must be used:

print 'price: %s' % price

instead of

print 'price:', price

even though their outputs are the same.


4 posts were split to a new topic: Sth is wrong with my orange but don't know why