Chapter 4 Flashcards

1
Q

Repetition Structure

A

Makes computer repeat included code as necessary.

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

While Loop

A

While condition is true, do something

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

What are the two parts of a while loop?

A

To test the condition for its truth value and repeat the statement as long as the condition is true.

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

Iteration

A

One execution of the body a loop.

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

Why is a while loop known as a pretest loop?

A

The condition is tested before performing the iteration.

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

Infinite Loop

A

Loop that does not have a way of stopping.

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

Count-Controlled Loop

A

Iterates a specific number of times.

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

Target Variable

A

The variable which is the target of the assignment at the beginning of each iteration.

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

Condition-Controlled Loop

A

Uses a true/false condition to control the number of times that it repeats as long as the condition is true.

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