Stuck at A Day at the Supermarket part 8 in python


#1



https://www.codecademy.com/courses/python-beginner-en-IZ9Ra/1/3?curriculum_id=4f89dab3d788890003000096

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]


#2

Hi this line

print "prices: %s" ....

remove the s to prices it should be price


#3

Why? What's the logic behind that?


#4

Look at the instrudction


they aske you to print it like that

apple
price: 2
stock: 0

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

apple
prices: 2
stock: 0

and it will see it like an arror


#5

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