Chapter 5: Iterations Flashcards
A variable used in a loop to add up a result.
accumulator
A variable used in a loop to count the number of times something happened. We initialize it to zero and then increment it each time.
counter
An update that decreases the value of a variable.
decrement
To assign a starting value to a variable that will be updated.
initialize
An update that increases the value of a variable (often by one).
increment
A loop in which the terminating condition is never satisfied or for which there is no terminating condition.
infinite loop
Repeated execution of a set of statements using either a function that calls itself or a loop.
iteration
statement inside while loop to exit loop
break
statement to skip to the next iteration without finishing the body of the loop for the current iteration
continue
indefinite loop that loops until some condition becomes false
while loop
definite loop that loops through a known set of items so it runs through as many iterations as there are items in the set
for loop
a special constant value which we can store in a variable to mark the variable as “empty”
None