An error about printing


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

what's wrong with my code?

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


your code is correct and functional. In order to validate it by codecademy, a strict syntax is needed for the output. In your case, you need to add a space between your colons : and the value printed (see the example given in the instructions).


add space before %s