W WolfCode · CSC 141

Spot the Bug

找出 bug

≈ 20 min · python-debugging · Open in WolfCode

Three broken functions. Each has exactly ONE bug. Find each with the smallest change that fixes it.

Bug #1 — off-by-one

Python · runnable

Bug #2 — function does nothing

Python · runnable

Bug #3 — logic inverted

Python · runnable