Error in Exercise: Keeping Track of the produce


#1



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


I allways get the same error, but it seems everything is ok.

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


prices = {"banana": 4,"apple": 2,"orange": 1.5,"pear": 3}
    
stock = {"banana": 6,"apple": 0,"orange": 32,"pear": 15}

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


#2

Instructions:
Like the example above, for each key, print out the key along with its price and stock information. Print the answer in the following format:

apple
price: 2
stock: 0

now check your format in the console. is it same?


#3

Yes, that's how I'm writing it.

The problem is with the values for "orange", but I don't understand why.


#4

I already got it. Thanks. Instead of "price" all smallcapitals I had written "Price".

Thanks for your help!!!!


#5

I had a problem with oranges too i dont know what i did beside from refreshing but here you go if somebody needs it:

i think somethimes their program goes nutsXD


#6

Thanks for your contribuition to my doubt.


#7

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