Chapter 4 Flashcards
A __________ -controlled loop uses a true/false condition to control the number of
times that it repeats.
sentinel loop
A __________ -controlled loop repeats a specific number of times.
count-controlled loop
Each repetition of a loop is known as a(n) __________.
an iteration
The while loop is a __________ type of loop.
pretest loop
A(n) __________ loop has no way of ending and repeats until the program is interrupted
infinite
The -= operator is an example of a(n) __________ operator.
The -= operator is an example of a(n) __________ operator.
A(n) __________ variable keeps a running total.
accumulator
A(n) __________ is a special value that signals when there are no more items from a list of items to be processed. This value cannot be mistaken as an item from the list.
sentinel
GIGO stands for
garbage in, garbage out
The integrity of a program’s output is only as good as the integrity of the program’s
input
The input operation that appears just before a validation loop is known as the
priming read
Validation loops are also known as
error traps
What is a repetition structure?
A structure that causes a section of code to repeat
What is a condition-controlled loop?
A loop that uses a true/false condition to control the number of times that it repeats
What is a count-controlled loop?
A loop that repeats a specific number of times