Unknown error



It should not show the error

Replace this line with your code. 
for key in prices:
    print "orange"
    print "price: %s" % prices["orange"]
    print "stock: %s" % stock["orange"]


Well, you are using a for loop and you are basically just printing the information of one fruit 4 times instead of all of them once. Change "orange" to the index for your loop.


You are manually specifying orange in your print statement. That should be whatever fruit you are printing the price and stock level for. Which is the key in prices.


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