I don't know why it reminded me to check my code, I think it's right!


#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 "Prices: %s" % prices[key]
print "Stock: %s" % stock[key]


#2

It is right :slight_smile:
The checker just wants you to lowercase price and stock because it's picky about capitalization.

And remember that now you're printing the price of a single item rather than the prices as a whole.


#3

But what should I do to pass it?


#4

Match the words/capitalization to the instructions.


#5

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