2026-06-11 Β· BEGINNER Β· Five suspects. One is lying.
def fib(n): if n < 2: return n return fib(n-1) + fib(n-2) print(fib(-1))
# (no error β but the recursion descends forever in negative numbers) # In practice this hits RecursionError after ~1000 frames. RecursionError: maximum recursion depth exceeded
s = "hello" for i, c in enumerate(s): print(i, c)
# (no error) 0 h 1 e 2 l 3 l 4 o
try: x = 1 / 0 except ZeroDivisionError: print("caught") else: print("no error") finally: print("always")
# (no error) caught always
with open("/tmp/does-not-exist.txt") as f: print(f.read())
Traceback (most recent call last): File "lineup.py", line 1, in <module> with open("/tmp/does-not-exist.txt") as f: ~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^ OSError: [Errno 13] Permission denied: '/tmp/does-not-exist.txt'
numbers = [1, 2, 3, 4, 5] squared = [n ** 2 for n in numbers if n % 2 == 0] print(squared)
# (no error) [4, 16]
The Stack Trace Lineup is a daily warm-up. The real curriculum is 1,300+ lessons of writing real code, not just spotting fakes. First 15 lessons free, no signup.
Tomorrow's lineup unlocks at 00:00 UTC. Past puzzles β