8/13


#1

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]

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


#2

Don't remember 100% but I think you are a space off in your print.

print "price:  %s" % prices[key]
print "stock:  %s" % stock[key]

Anyways, you must match the print asked for in the description of the assignment exactly for it to pass.


#3

not quite it still has the same error. Almost thanks anyway


#4

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]

Try this... it should work


#5

Just tab the last 3 lines