Keep Track of Produce (Orange problem)


Here's my code. I see nothing wrong at all! Is there a bug with the code checker?

prices = {"banana": 4, "apple": 2, "orange": 1.5, "pear": 3}
stock = {"banana": 6, "apple": 0, "orange": 32, "pear": 15}
for item in prices:
print item
print "price: ", prices[item]
print "stock: ", stock[item]


Missing modulo formatters.

print "something %s" % variable


I tried that before. Didn't work. And based on the instructions, there's no need for that.


Never mind. I see it now.
But my syntax of print "something: ", something[item] should be equally valid, isn't it?


Yes, just that the SCT didn't accept it. Raw output can be a comma separated list. String formatting is a great tool once we get the hang of it.


Thanks for that. What's SCT?


SCT => Submission Correctness Test

The lesson checking program behind each lesson.