8. keeping trace of product


Could anyone help with my code

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

Oops, try again. Check what your code prints for orange. It doesn't look quite right!
It doesn't show it in the post but it is properly indented in the code, no errors.

8. Keeping Track of Produce

Hey! You print prices instead of price. That's all.


you do not print the "key" correctly.


print "%s" % key


sometimes there are multiply ways to solve a problem, both ways are good to print key. The problem is what @dutchc0de says it is, the price instead of prices.


you need to change "prices" to "price" than it will work


your code can be completely correct but if "Price" or "Stock" is uppercase it also wont work. same with plurals, etc.


Thanks everyone I did everything you guys said and it wouldn't work until I capitalized Orange lol go figure.