Keeping track of produce


#1



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


The output looks to be in the correct format, but it throws an error stating "Oops, try again. Check what your code prints for orange. It doesn't look quite right!" The format is the exact same, minus the coloration. I even tried adding a print "" to add a space between the keys, but it says I need exactly 3 print statements. I'm just not sure what's wrong here as everything appears to be correct.


I expected to complete the exercise.


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

I had the same problem


#3

ohhh. I got it. you just have to take out the s in prices. Have to be really accurate I guess.


#4

Oh my goodness, Thank you sir! That worked!


#5

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