I cant see whats wrong with my code


I cant see whats wrong with my code, please helppp!!

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

Keeping track of the produce print

Follow the example in the lesson pane at left.

apple (key name)

This lesson checks the spelling.


I dont know whats stopping me here....

Read the post and I believe my spellings are correct as well.


Believe it or not, the white space is the issue:

print ("stock:  %s" % stock[key])

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

print ("stock: %s" % stock[key])



OMG :rage:

I was really stucked..

Thanks alot though (y)


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.