in “A Day at the Supermarket, Keeping Track of the Produce”, I noticed a problem:
You are asked to print out the values of all keys in two dictionaries (‘prices’, and ‘stock’). The keys are the same in both dictionaries. This is the code:
for item in prices:
print item
print “price: %s” % prices[item]
print “stock: %s” % stock[item]
You can not advance through this excercise if the
price: and stock:
both begin with capital letters. I had my code like the following:
for item in prices:
print item
print “Price: %s” % prices[item]
print “Stock: %s” % stock[item]
And the exercise told me to look at what I printed out for the value of Orange (which is in the dictionary.) The end result, what was being printed, was the same as it was when the exercise completed successfully.
This issue caused me quite some confusion, especially because the error message did not provide any help. I got to the solution by trial and error.
I think this is a bug, and might need fixing.
Thanks in advance