Chapter 4 Loops
A _______ loop executes statements repeatedly while the condition is true.
The loop-continuation-condition must always appear within the __________.
(count < 100) is an example of a ______ ______ ______.
loop continuation condition.
In order for the loop-continuation-condition to eventually terminate it will have to eventually become _______.
A _______ loop is the same as a while loop except it executes the loop body first and then checks the loop continuation condition.
A ________ loop has a concise syntax for writing loops.
Three types of repetition statements (loops) are:
The part of the loop that contains the statements to be repeated is called the _____ ______
A one time execution of a loop body is referred to as an _______ of the loop.
An ______ loop is a loop that executes infinitely.
The while loop checks the ______ _____ ______ first. If the condition is true, the loop body is _________. If it is false, the loop ________.
A _______ value is a special value that signifies the end of a loop.
The ____ loop generally is used to execute a loop body a predictable number of times; this number is not determined by the loop body.
The while and for loop are called the _____ loops because the continuation condition is checked before the loop body is executed.
The do-while loop is called a _________ loop because the continuation condition is checked after the loop body is executed.
Looping makes computer programming ______ and ________.
A loop is a structure that ______ ______ while some condition continues.
A _______ loop executes a predetermined number of times.
Loop control variables are altered by ________ and _______.
A _______ ______ loop is a program that counts loop repetitions.
counter - controlled
True or false. An indefinite loop and infinite loop are the same.
A for loop automatically does these 3 things:
An ________ is a variable that gathers values.
These 3 steps must occur in every loop:
Initialize loop control variable
Compare variable to some value
Alter the variable that controls the loop
Loops within loops are called ______ loops.
Nested loops maintain two individual ______ _______ ________.
loop control variables
Loops are used to ensure data is ______ by prompting the ______.
A _______ loop is used with definite loops when number of _______ is known.
4 common mistakes made by programmers:
Neglecting to initialize loop control variable
Neglecting to alter loop control variable
Using wrong comparison with loop control variable
Including statements inside the loop that belong outside the loop.
Chapter 4 Loops