Time: 0:00
This is an off-by-one errors bug
The loop that runs one time too many, the slice that drops the last item, the index that starts in the wrong place.
A list of 3 items has indexes 0, 1 and 2. The condition i <= len(prices) lets i reach 3, and prices[3] does not exist. The loop has the right body and the right start, but one too many iterations, which is the textbook off-by-one. With 0-based indexes the condition is almost always i < len(...). Better still, loop over the items directly (for price in prices) or use sum(prices), and there is no index to get wrong.
The pattern behind it: off-by-one errors.
Paste this into any web page or blog post. Visitors fix the bug right there, in their browser.
<iframe src="https://trybughunt.com/embed/d881cbb1-ce2f-4739-97dd-9cee9ecff420" title="Debugging challenge: Shopping total crashes at the end of the list" width="100%" height="580" loading="lazy" style="border:1px solid #d4d4d8;border-radius:12px;max-width:760px"></iframe>
<p style="font-size:14px">Debugging challenge from <a href="https://trybughunt.com/challenges/d881cbb1-ce2f-4739-97dd-9cee9ecff420">BugHunt</a></p>