Keeping track of produce


#1

<PLEASE USE THE FOLLOWING TEMPLATE TO HELP YOU CREATE A GREAT POST!>

<Below this line, add a link to the EXACT exercise that you are stuck at.>
https://www.codecademy.com/courses/learn-python/lessons/a-day-at-the-supermarket/exercises/keeping-track-of-the-produce-?action=lesson_resume

<In what way does your code behave incorrectly? Include ALL error messages.>

Check what your code prints for orange. It doesn’t look quite right!

<What do you expect to happen instead?>

```python

Replace this line with your code.

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]

<do not remove the three backticks above>

#2

Use lowercase only on the labels.


#3

wow -.- I cant believe it was something that simple.
Thank you!


#4

This problem would never come up if the SCT would accept both upper and lower case. As it is, it comes up very frequently. Pay close attention to examples given in the lesson. They often contain the hint of what’s expected.


#5

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