Stuck at A Day at the Supermarket part 8 in python


The error message I'm receiving is as follows: "Oops, try again. Check what your code prints for orange. It doesn't look quite right!"

As far as I'm concerned I'm doing it right: It prints the name , the price and the stock with all words and numbers in exact order.

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]


Hi this line

print "prices: %s" ....

remove the s to prices it should be price


Why? What's the logic behind that?


Look at the instrudction

they aske you to print it like that

price: 2
stock: 0

but if you add the s to price its will be different from what they aske you to do

prices: 2
stock: 0

and it will see it like an arror


Very well said and explained. Thank you for your kind help.