8-stocking out 1


#1

shopping_list = ["banana", "orange", "apple"]

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

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

Write your code below! total = 0

for item in stock:
stock >= 0
total += item price
stock -= 1

it returns File "python", line 20
total += item price
^
SyntaxError: invalid syntax.What is the problem please


#2

Could you use the code mark up function please? In the mean while, look at some of the other solutions. SPOILER :smile: .