Which fix removes the bug?
total = 0
for price in prices:
total =+ price
- Swap
=+for+= - Initialise total to 1
- Cast price to int
- Move total inside the loop
=+ price parses as = (+price), so each pass overwrites the total instead of adding to it.