Time: 0:00
This is a logic errors bug
The wrong operator, an inverted condition, a formula the right way round but backwards.
Starting the running maximum at 0 quietly assumes at least one value is above 0. When every reading is negative, nothing ever beats the starting value, so the made-up 0 is returned. The fix is to start from a real value: the first reading. This is the classic "wrong initial value" bug, and it hides because typical test data is positive. Python's built-in max(readings) avoids it entirely; when you write the loop yourself, seed it with data, never with a guess.
The pattern behind it: logic 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/fc7d3d08-a7e7-4e99-a168-45683079b894" title="Debugging challenge: Highest temperature reads 0 on a cold day" 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/fc7d3d08-a7e7-4e99-a168-45683079b894">BugHunt</a></p>