Keepin track orange ish


#1



it tells me orange is printing out wrong

I expect it to work just fine


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


please what is the problem


#2

prices needs to be price, and you need to get rid of the space between price and the colon, :


#3

thanks a lot that did it. have a splendid day


#4

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

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

for key in price:
print key
print "Price: %s" % price[key]
print "Stock: %s" % stock[key]

The explanation above doesn't solve the issue for me @kyleaw , any idea please?
It keeps saying: Oops, try again. Check what your code prints for orange. It doesn't look quite right!


#5

price and stock need to be lowercase


#7

Ok.. thanks alot for your reply.

This solved my problem, but when I returned both to uppercase, it still worked, tho it didnt work earlier...

So, I guess its proly something wrong with the compiler.

:slight_smile:


#8

So, I tried it again, and and it threw back and error.. so guess youre so right.


#9