Prob with orange even after spacing


Exc. 8 Keeping track of procedure.

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]


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

price: 2
stock: 0

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


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


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