What is wrong with it?



I am doing this exercice and always get this error, I do not why:
Oops, try again. Check what your code prints for orange. It doesn't look quite right!

Thanks you in advance!

prices = {
stock = {

for key in prices:
    print key
    print "prices: %s" % prices[key]
    print "stock: %s" % stock[key]


Hi @digitalwhiz11064,

Compare the output from your code to the format of the output specified in the instructions. For your code to pass, it must match the specified format exactly.

As an example of the difference, for apple, the output should be ...

price: 2
stock: 0

However, your code produces ...

prices: 2
stock: 0


This is Formatting mistake, Your code is fine.
Codeacademy's code output formatting just is not matching with your code.

There is just one minor mistake that @appylpye have mentioned.
I hope you already found the solution ?
If not...
then just tell me difference between price and prices?
I hope it helps!:slight_smile:


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