CH_4_Repitition_Structures Flashcards

1
Q

Two broad categories of loops

A

Condition Controlled

Count Controlled

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

Repetition Structure (Loop)

A

Causes a statement or set of statements to execute repeatedly

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

Condition Controlled Loop

A

Causes a statement or set of statements to repeat as long as a condition is true.

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

Count Controlled Loop

A

A loop that repeats a specific number of times.

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

Iteration

A

A single execution of the body of a loop.

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

Pretest Loop

A

A loop that tests its condition before performing an iteration.

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

Counter Variable

A

A variable that is assigned a unique value during each iterations of a loop.

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

Three required actions of Count-Controlled While Loop

A
  • Initialization
  • Comparison
  • Update
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Infinite Loop

A

A loop that has no way of stopping.

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

Target Variable

A

The variable that is the target of an assignment during each iteration of a for loop.

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

Iterable

A

An object that contains a sequence of values and can be iterated over with a loop.

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

Step Value

A

In a for loop, the amount by which the counter variable is incremented.

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

Accumulator

A

The variable that accumulates the total of a group of values as a loop iterates.

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

Running Total

A

The ever-increasing total that is kept in an accumulator variable.

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

Augmented Assignment Operator

A

An assignment operator that is combined with a math operator.

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

Sentinel

A

A special value that marks the end of a sequence of values.

17
Q

Input Validation (Error Trap or Error Handler)

A

The process of confirming the validity of input.

18
Q

Priming Read

A

An input operation that occurs just before the first iteration of the loop that continues to read the input.