# A Day at The SuperMarket

#1

"" Oops, try again. It looks like your code did not print the correct total."""

INSTRUCTIONS:

Create a variable called total and set it to zero.Loop through the prices dictionaries.For each key in prices, multiply the number in prices by the number in stock. Print that value into the console and then add it to total.Finally, outside your loop, print total.

I am sure its because im tired as all get out and he obv anser is right in front of me just looking for a little direction in the right area!

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

tHIS IS THE OUTPUT::
orange
price: 1.5
stock: 32
pear
price: 3
stock: 15
banana
price: 4
stock: 6
apple
price: 2
stock: 0
48.0
45
24
0
0
None

#2

All of your code is right except for in your second for loop, you never set total equal to prices times the stock

total = prices[key] * stock[key] + total

#3

Lol duh i knew it was something silly thanks so much!

#4