A day at the supermarket .Keeping track of the produce .. HELP!


#1

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

This code is not working for me ! I have been stuck on this for hours and I've copied and pasted many different answers and nothing is working. Its telling me

File "python", line 14
for item in prices:
^
SyntaxError: invalid syntax

BTW line 14 is for item in prices:


#2

I don't know python, but I see that you forgot to close stock:

stock = {
"banana": 6,
"apple": 0,
"orange": 32,
"pear": 15
} // here

#3

Ahh nice it worked! Thanks. I cant believe i missed that


#4