Chap. 5 (Iteration) Flashcards
Define Accumulator
A variable used in a loop to add up or or accumulate a result.
Define Counter
A variable used in a loop to count a number of times something happened. We initialize a counter to zero and then increment the counter each time we want to “count” something.
Define Decrement
An update that decreases the value of a variable.
Define Initialize
An assignment that gives an initial value to a variable that will be updated.
Define increment
An update that increases the value of variable. (Often by one)
Define infinite loop
A loop in which the terminating condition is never satisfied or for which there is no terminating condition.
Define iteration
Repeated execution of a set of statements using either a function that calls itself or a loop.