Keeping track of the produce - A day at the supermarket


I get a message saying "
Oops, try again. Check what your code prints for orange. It doesn't look quite right!"
Also, although i've included it in my code, what's the reason for typing "print key"? why is that necessary? especially if we're saying print price and print stock

I dont get whats wrong the info being printed for orange seems to be right?

prices = {
    "banana": 4,
    "apple": 2,
    "orange": 1.5,

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]


price and stock should be lowercase, the output should be an exact match


thankyou it worked! why lowercase though the example shows it in uppercase?


that is just an example, the instructions:

clearly show they want the output in lowercase.


A post was split to a new topic: Keeping trace of produce