Oranges error!



check what your code prints for orange

no error message

Replace this line with your code. 

for key in prices:
    print key
    print "price: ", prices[key] 
    print "stock: ", stock[key]


Hi @pk_46,

Instead of this ...

    print "price: ", prices[key] 
    print "stock: ", stock[key]

... use format strings to compose your output, as Codecademy demonstrated in these example lines ...

    print "Once: %s" % once[key]
    print "Twice: %s" % twice[key]

Codecademy wants you to use a single expression in each print statement, as in their example.


2 posts were split to a new topic: Keeping Track of the Produce: Oranges Error


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