Time: 0:00
This is a type errors bug
Totals that concatenate, sorts that put 10 before 9, comparisons that refuse to run.
Strings in Python are immutable: once created, their characters cannot be changed. name[0] can read the first character, but name[0] = ... tries to overwrite it, which is not allowed. Lists allow item assignment; strings never do. To "change" a string you build a new one from pieces: the uppercased first letter plus the rest, name[1:]. Every string method, including upper(), replace() and strip(), works the same way: it returns a new string and leaves the original untouched.
The pattern behind it: type 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/9c1960e3-7026-45dd-b56f-fe468bd7e80f" title="Debugging challenge: Name formatter crashes on the first letter" 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/9c1960e3-7026-45dd-b56f-fe468bd7e80f">BugHunt</a></p>