Doing something wrong


#1



When I run, it gives me an error, but I can't for the life of me see what is wrong, obviously there is, but I'm just not seeing it... It even prints everything out the correctly (I think).


I get the following error:

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

I get this printed out on the console:

orange
Price: 1.5
Stock: 32
pear
Price: 3
Stock: 15
banana
Price: 4
Stock: 6
apple
Price: 2
Stock: 0
None


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]


#2

your p and s are capital!


#3

Hmmm...

Guess I now know that my outputs are case sensitive.

Thanks!


#4

No problem! And yes, most of the time, the checker is very, very sensitive.


#5

i get the same error. with the same message, and I dont know why.

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]


#6

You have a space between price and the colon. Same for stock.


#7

thank you! I was losing my mind


#8