I'm told to multiply the stock by the price and print it as 'Total'.
My answer is below, figured I'd redefine total. it prints the desired result correctly, but instead of moving on,I get a error: "looks like the code didn't print the correct total."
I've looked at other posts and they say that I should declare a new variable inside the for loop and add that to the 'Total' that I previously defined, but that just doesn't seem efficient to me.
Am I breaking some kind of Python rule or is Codeacademy playing up again?
for key in prices: print key print "price: %s" % prices[key] print "stock: %s" % stock[key] total = 0 for key in prices: total = prices[key] * stock[key] print total