Creado por Andrew Lewis
hace casi 4 años
|
||
A _____-controlled loop uses a true/false condition to control the number of times that it repeats.
A _____-controlled loop repeats a specific number of times.
Each repetition of a loop is known as an _____.
The "While" loop is a _____ type of loop.
The "Do-While" loop is a _____ type of loop.
The "For" loop is a _____ type of loop.
An _____ loop has no way of ending and repeats until the program is interrupted.
A _____ loop always executes at least once.
A _____ 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.
A _____ causes a statement or set of statements to execute repeatedly.
Both "_____" and "_____" lops cause a statement or set of statements to repeat as long as a condition is true.
The "_____" loop causes a statement or set of statements to repeat until a condition is true.
True/False: Modules can be called from statements in the body of a loop. This actually often improves the code's design.
A _____ loop means that it tests its condition before performing an iteration.
What is the difference between a "Do-While" loop and a "Do-Until" loop?
A _____ stores the number of iterations that it has performed within a count-controlled loop.
Using the counter variable, the loop typically performs the following three actions:
To _____ a variable means to increase its value.
The count-controlled loop _____ the counter variable by comparing it to a maximum value. If the counter variable is less than or equal to the maximum value, the loop iterates. If the counter is greater than the maximum value, the program exits the loop.
Before the count-controlled loop begins, the counter variable is _____ to a starting value. The starting value that is used will depend on the situation.
The amount by which the counter variable is incremented in a "For" loop is known as the _____.
True/False: Most programming languages provide a way to change the step amount. This gives you the ability to increment the counter variable by any value you wish.
To _____ a variable means to decrease its value.
True/False: In most situations, it's best to use the "For" statement to write a count-controlled loop.
True/False: If you forget to increment the counter variable in a count-controlled "While" loop, the loop will iterate an infinite number of times.
A _____ is a sum of numbers that accumulates with each iteration of a loop. The variable used to keep it is called an _____.
What two key elements are used in programs to calculate the total of a series of numbers?
Should an accumulator be initialized to any specific value? Why or why not?
Why should you take care to choose a unique value as a sentinel?
A _____ is a loop that is inside another loop.
True/False: In a nested loop, an inner loop goes through all of its iterations for every single iteration of an outer loop.
True/False: In a nested loop, inner loops complete their iterations slower than outer loops.
True/False: In a nested loop, to get the total number of iterations of a nested loop, multiply the number of iterations of all loops.