An error about printing


#1


https://www.codecademy.com/courses/python-beginner-en-IZ9Ra/1/3?curriculum_id=4f89dab3d788890003000096

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?


prices={
    'banana':4,
    'apple':2,
    'pear':3,
    'orange':1.5
    }
stock={
    'banana':6,
    'apple':0,
    'pear':15,
    'orange':32
    }
for key in prices:
    print key
    print "price:%s" % prices[key]
    print "stock:%s" % stock[key]


#2

Hi
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).


#3

add space before %s