Keeping Track of the Produce is yelling at me!


#1



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


This is a much simpler code, I had a previous one with better formatting and text in the message to look prettier, but alas it kept yelling at me about only have 3 PRINTs(even though I only had 3)
I keep getting this message from the new simplified code:

"Oops, try again. Check what your code prints for orange. It doesn't look quite right!"


It should be working, there are only 3 prints, and Orange looks fine


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]


#2

Try removing the space before the closing quotes here:

This should resolve. :slight_smile:


#3

And it did!!!

I have been yelled at before about trailing spaces, I should know better. lol
Thank you


#4

You are welcome.

Have fun coding! :keyboard: :wink:


#5

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