Spot the Bug
找出 bug
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