Something of value


#1



File "python", line 17
total= 0
^
SyntaxError: invalid syntax


I don't understand why it has a problem with total=0


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 key in prices:
    t= prices[key]*stock[key]
    total+=t
    print total


#2

look at the line above, a ] is missing after key


#3

Thank you. I kept looking at the line with total since that's what it said was wrong. I didn't check the rest of my code.


#4