Keeping track of the Produce


#1


Well,I have tried all solutions as I can find,But…… the error is still there?
help plz


#2

Hi try to refresh the page.


#3

I tried just now ,but it does`t work


#4

but that works

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]

#5

Well,I changed "key" to "a" in for loops,but no work ,either:cry:


#6

i found the error. Just delete the S on price(s)

print "prices: %s" % prices[key]
^


#7

wow,so clever!
Thank you so much