HELP Keeping track of produce


#1



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


I keep getting syntax error for line 20 and i have no idea why. if someone could help me before i lose my mind that would be great!!


#Price of fruit
prices = {
    "banana": 4,
    "apple": 2,
    "orange": 1.5,
    "pear": 3
    }

#Amount of fruit
stock = {
    "banana": 6,
    "apple": 0,
    "orange": 32,
    "pear": 15
    }

#Code to display price and stock
for item in prices:
    print item 
    print "price: %s" prices[item]
    print "stock: %s" stock[item]


#2

Line 20 is referring to print "price: %s" prices[item]. My bad for the lack of explanation!!


#3

print "price: %s" % prices[item]

You forgot a percent sign


#4

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