HELP Keeping track of produce


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]


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


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

You forgot a percent sign


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