Why only orange would lead to an error?


having the same issue. can't understand why only orange would lead to an error if they are all formatted the same

prices = {

stock = {

for key in prices:
print "key= " + str(key)
print "prices: %s " %prices[key]
print "stock: %r" %stock[key]

**a note that the code is interpreted without error in the subsequent exercise

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

No verbosity, and key is already a string so no need to cast it.

print key

The SCT has a limited number error messages and this one is the most common.


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