answers rated A+ 2025
a repetition structure or loop - correct answer makes a computer repeat an
operation as many times as necessary
there are two categories of loops - correct answer condition controlled and
count controlled
a condition controlled loop - correct answer uses a true-false condition to
control the number of times that it repeats
a count controlled loop - correct answer repeats a specific number of times
what is a loop iteration? - correct answer An execution of the statements in
the body of the loop
what is the difference between a pretest loop and a post test loop - correct
answer a pretest loop tests its condition before it performs an iteration. A
posttest loop tests its condition after it performs an iteration
does the while loop test its condition before or after it performs an iteration? -
correct answer before
does the do-while loop test its condition before or after it performs an
iteration? - correct answer after
what is an infinite loop? - correct answer a loop that has no way of stopping
and repeats until the program is interrupted
, what is the difference between a do-while and a do-until loop? - correct
answer a do while iterates while a condition is true, a do until iterates until a
condition is true, when the condition is true the do until stops
what is a counter variable - correct answer a variable that is used to store the
number of iterations that is has performed
what three actions do count controlled loops typically perform using the
counter variable - correct answer initialization, test, and increment
when you increment a variable what are you doing a? when you decrement a
variable what are you doing? - correct answer incrementing a variable means
increasing its value. Decrementing a variable means decreasing its value
a program that calculates the total of a series of numbers typically has what
two elements? - correct answer 1. a loop that reads each number in the series
2. a variable that accumulates the total of the numbers as they are read.
what is an accumulator? - correct answer a variable that is used to
accumulate the total of a series of numbers
should an accumulator be initialized to any specific value? why or why not? -
correct answer yes. initialized with a value of zero. numbers are added to the
accumulator by a loop, so it must begin at 0, else it will not contain the correct
total of numbers that where added.
what is a sentinel - correct answer a special value that marks the end of a list
of values