Chapter 4 Flashcards
Repetition Structure
Makes computer repeat included code as necessary.
While Loop
While condition is true, do something
What are the two parts of a while loop?
To test the condition for its truth value and repeat the statement as long as the condition is true.
Iteration
One execution of the body a loop.
Why is a while loop known as a pretest loop?
The condition is tested before performing the iteration.
Infinite Loop
Loop that does not have a way of stopping.
Count-Controlled Loop
Iterates a specific number of times.
Target Variable
The variable which is the target of the assignment at the beginning of each iteration.
Condition-Controlled Loop
Uses a true/false condition to control the number of times that it repeats as long as the condition is true.