Have no idea what is wrong with code


#1

prices = {
"banana" : 4,
"apple" : 2,
"orange" : 1.5,
"pear" : 3,
}
stock = {
"banana" : 6,
"apple" : 0,
"orange" : 32,
"pear" : 15,
}

for key in prices:
print key
print "price: %s" % prices[key]
print "stock: %s" % stock[key]
total = 0
for i in prices:
prices[i] = prices[i] * stock[i]
print prices[i]
total = total + prices[i]
print total


I keep on getting "Oops, try again.
It looks like your code did not print the correct total."
Pls help.


#2

Also, a lot of the formatting was messed up when i copied and pasted the code


#3

Try that:
Total = 0
For key in prices:
Sum = prices [key] * stock[key]
Total += sum