A Day at the Supermarket


#1

for item in prices:

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

thanks for any tips


#2

One space after each colon.


#3

here:

print "apple"

you should print each item, not only "apple", and mtf suggestion


#4

didnt change anything (you meant the colons after s% right ?


#5

you mean

for item in prices:

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

?


#6

before

...: %s

The lesson checker is looking for exact verbiage.


#7

did you see my answer?


#8

I thought I would do that

for item in prices:

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

but it didnt work


#9

Remove the quotes so the variable prints.


#10

Any suggestion or other hints so I can solve the problem ?


#11

for item in prices:    
    print item
    print "price :%s" % prices[item]
    print "stock :%s" % stock[item]

#12

That looks correct. Did it pass?


#13

I removed the quotes but still ...


#14

Actually, the space should be after the colon, before the %s.


#15

Ah now we got it thanks !


#16