Off-by-one error: A bug where a loop executes one too many or one too few times, often caused by using < instead of <= or vice versa.
How to apply it: Test loop boundaries with the first and last values to detect off-by-one errors.
Course: AP Computer Science A · Unit: Iteration
Practice questions about Off-by-one error on AimFive — get rubric-based feedback showing exactly which points you earned.
AP and Advanced Placement are trademarks of College Board. AimFive is not affiliated with or endorsed by College Board.