Day at the supermarket 8


#1

Hello Ladies and Gents good morning or afternoon to you all! I have a problem with this code that I am not catching:

prices = {
"banana": 4,
"apple": 2,
"Orange": 15,
"pear": 3
}
stock = {
"banana": 6,
"apple": 0,
"
range": 32,
"pear": 15,
}
for items in prices:
print items
print "Prices: %s" % prices[items]
print "Stocks: %s" % stock[items]

It says to check orange and says somethings wrong with it.I don't get it!


#2

Sorry about the range thing i fixed it in my code but that's not the problem


#3

Both oranges I set to lower case but that's also not it


#4

Hi, @youcantstopit ,

Do the instructions ask you to print Prices: and Stocks: as part of the output? Compare the instructions to your output for correspondence of the exact case and spelling.


#5

ok i will gimma a minute


#6

Yes that fixed it thank you for your help


#7

Hi @youcantstopit,
how the fixed the problem? I didn't understand the explanation of @appylpye.


#9

Please create your own topic with code + error message + question.

appylpye solution was specific for youcantstopit problem, your problem might be different