Prob with orange even after spacing


#1

Exc. 8 Keeping track of procedure.

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

I have read all the post of people that have experienced this similar problem. I have spaced and indented and double checked everything to no avail. Can someone please assist me in my code?

Err message (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

Someone had the exact same problem as you recently.
The instructions want you to output:

apple
price: 2
stock: 0

MEANING: Your Price and Stock should just be price and stock. No capitals.


#3

Thank you very much. The upper case letters were the problem. It runs and advances to the next exercise.


#4

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