A Day at the Supermarket: Keeping track of the produce


#1

So I’m stuck in this section (probably over something small I’ve missed) & I’m hoping to find some help. Here’s the code I’m running:

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 “Price: %s” % prices[key]
print “Stock: %s” % stock[key]

Every time I try to run this code, I keep getting the same error message:
Check what your code prints for orange. It doesn’t look quite right!

Here’s what prints out when I run it:
orange
Price: 1.5
Stock: 32
pear
Price: 3
Stock: 15
banana
Price: 4
Stock: 6
apple
Price: 2
Stock: 0

It looks like I’m getting the right answer, but it keeps telling me I’m not. What am I missing?


https://www.codecademy.com/courses/learn-python/lessons/a-day-at-the-supermarket/exercises/keeping-track-of-the-produce-?action=lesson_resume


#2

the information needs to be an exact match, this include case sensitivity (Price: vs price:)


#3

I knew it would be something stupid simple. Thanks!


#4