I cant see whats wrong with my code


#1

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
#2

Follow the example in the lesson pane at left.

apple (key name)
price: 
stock:

This lesson checks the spelling.


#3

I dont know whats stopping me here....

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


#5

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])

Passed.


#6

OMG :rage:

I was really stucked..

Thanks alot though (y)


#7

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