A day at the supermarket category


#1

If keep saying "Check what your code prints for pear. It doesn't look quite right!",
And I don't know whats wrong with this..for I think nothings wrong. Please help

prices = {"banana":4, "apple":2, "oranges":1.5, "pear": 3 }
stock = {"banana":6, "apple":0, "oranges":32, "pear": 15 }

for key in prices:
print key
print "price is %s" % prices[key]
print "stock is %s" % stock[key]


#2

Remove that word and everything else looks good.


#3

thank you so much...


#4

for key in prices:
print key
print "Prices: %s" % prices [key]
print "Stock: %s" % stock [key]
What's rong with this code?
It answers "Oops, try again. Check what your code prints for orange. It doesn't look quite right!"


#5

Use lowercase in the labels.


#6

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