I'm confused


I don't know what is wrong with my program, but it just prints the whole list, and then says that "orange seems off"

it just doesn't seem to work with the for loop, can someone tell me what is wrong.

prices = {"banana": 4,"apple": 2, "orange": 1.5, "pear": 3} 
stock = {"banana": 6,"apple": 0, "orange": 32, "pear": 15}

for Item in prices:
    print prices
    print "price" , prices[Item]
    print "stock" , stock[Item]


should say print
"price: "
and stock should look like
print "stock: "

with the colon and space before the closing quotes.


i am afraid you can't use ,, either use + to concatenate the string and variable or use %s like in the example of the exercise.

also, your colons after price and stock are missing


the , will add the space, but it won't work.


You're right, I wasn't paying attention to that, the %s is needed. Concatenation could work too.


Hi @rozzerz ,

Why are you displaying the entire prices dictionary here? ...

print prices


Its alright, I solved it about 5 mins after posting