Chapter 5: Iterations Flashcards

1
Q

A variable used in a loop to add up a result.

A

accumulator

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

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.

A

counter

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

An update that decreases the value of a variable.

A

decrement

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

To assign a starting value to a variable that will be updated.

A

initialize

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

An update that increases the value of a variable (often by one).

A

increment

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

A loop in which the terminating condition is never satisfied or for which there is no terminating condition.

A

infinite loop

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Repeated execution of a set of statements using either a function that calls itself or a loop.

A

iteration

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

statement inside while loop to exit loop

A

break

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

statement to skip to the next iteration without finishing the body of the loop for the current iteration

A

continue

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

indefinite loop that loops until some condition becomes false

A

while loop

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

definite loop that loops through a known set of items so it runs through as many iterations as there are items in the set

A

for loop

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

a special constant value which we can store in a variable to mark the variable as “empty”

A

None

How well did you know this?
1
Not at all
2
3
4
5
Perfectly