Answer stocking out


#1

shopping_list = ["banana", "orange", "apple"]
def compute_bill(food):
total = 0
for f in food:
if stock[f] > 0:
total = total + prices[f]
stock[f] = stock[f]-1
print stock[f]
return total

a = compute_bill(shopping_list)
print a

stock = {
"banana": 6,
"apple": 0,
"orange": 32,
"pear": 15
}

prices = {
"banana": 4,
"apple": 2,
"orange": 1.5,
"pear": 3
}


8-stocking out 1
#2

Thanks SELFIE! LoL
:grinning: :heartpulse: :two_hearts:


#3

its alright teardrop have fun xx