Keeping trace of product


#1

i'm having the same problem...can you help pls? my "stock" is in small but there is something else.


8.1 Keeping track of the Produce
Error in python-a day at the supermarket
#2

please post your code plus error message, then we can help you


#3

prices = {
    "banana": 4,
    "apple": 2,
    "orange": 1.5,
    "pear": 3
    }
stock = {
    "banana": 6,
    "apple": 0,
    "orange": 32,
    "pear": 15
    }
for i in prices:
       print i
       print "prices %s" % (prices[i])
       print "stock %s" % (stock[i])

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


#4

you have prices, it should be price and the colons are missing


#5

can u pls exactly tell me where shall the colons be placed?


#6

thank you so much i got the solution.


Error in python-a day at the supermarket
#7

What did you change to make it correct? I am having the same issue.


#8

what i suggested in my post? If problems persist, make a new topic


#9

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