Sentinel value: A special value that signals the loop to stop, such as -1 to indicate end of input.
How to apply it: Use a sentinel value with a while loop when the number of iterations is unknown.
Course: AP Computer Science A · Unit: Iteration
Practice questions about Sentinel value 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.