Keep track of the produce


#1



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

seems correct to me just keeps having error msg


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

me,too.I don't know what happened to orange.


#3

maybe you can put the } in a new line


#4

u can but that wont change the result


#5

i got it to work rewrite code and sort it out


#6

what do you mean sort it out. as in a sort command?


#7

like u can sort it out as in place in order yourself or us the command but what i di was rewrite the code and it worked


#8

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