Keeping track of the produce


#1



https://www.codecademy.com/courses/python-beginner-en-IZ9Ra/1/3?curriculum_id=4f89dab3d788890003000096


Oops, try again. Check what your code prints for orange. It doesn't look quite right!

apple
price: 2
stock: 0

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


#2

you should print all products name, price and stock quantity? Not only for apple.

and a product has a price, not prices


#3

edit - nvm, I got it. didn't realize it was also sensitive about capitalization.

Don't know what I'm missing. The output is correct, but still says there is something wrong with the output for orange.

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]


#4

Use identation after the loop


#5

that is because no markup/format was used, so indent won't show on the forum


#6