Umm... what am I doing wrong here, 10. Keeping track of the produce


#1



10. Keeping track of the produce


Oops, try again. You should have exactly three print statements! (Make sure there are no occurrences of 'print' in any comment or string!)


I wanted this to work but it doesn't, please help me...


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

stock = {
    "banana": 6,
    "apple": 0,
    "orange": 32,
    "pear": 15
}
for key in stock:
    print "prices: %s" % prices[key]
    print "stock: %s" % stock[key]


#2

it should be price, not prices

you forgot to print the product name which is stored in key


#3

oh lol ok :sunny: :sunny:


#4

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