Keeping Track of Produce


#1

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

I dont know why do I have this error: Oops, try again. Check what your code prints for orange. It doesn't look quite right!

The terminal looks ok, but i still have the error.

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]

Please, I wait for your answer. Thanks. Greetings


#2

There, you started both prices and stock with uppercase letters and the interpreter as in the instructions, expects to see exactly as instructed.

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

I hope this helps! :slight_smile:


#3

Thanks! Only for the uppercase letters.... hahahaha


#4

Yes, just it!

You're welcome.

Have fun coding! :slight_smile: