Chapter 6: Loops Flashcards
body
All statements of a method or block.
loop
A sequence of instructions that is executed repeatedly.
off-by-one errors
A common programming error in which a value is one larger or smaller
than it should be.
symmetric bounds
Bounds that include the starting index and the ending index.
asymmetric bounds
Bounds that include the starting index but not the ending index.
sentinel
A value in input that is not to be used as an actual input value but to signal the end of input.
redirection
Linking the input or output of a program to a file instead of the keyboard or display.
counter
a variable that is initialized with 0 and incremented whenever there is a match
nested loop
A loop that is contained in another loop.
pseudorandom numbers
A number that appears to be random but is generated by a mathematical formula.
Loop and a half
A loop whose termination decision is neither at the beginning nor at the
end.