Exam 5: Looping

arrow
  • Select Tags
search iconSearch Question
flashcardsStudy Flashcards
  • Select Tags

A(n) ____ loop executes a predetermined number of times.

(Multiple Choice)
4.9/5
(39)

A mistake programmers often make with loops is that they ____.

(Multiple Choice)
4.8/5
(38)

The first step in a while loop is typically to ____.

(Multiple Choice)
4.9/5
(36)

____ is a technique with which you try to prepare for all possible errors before they occur.

(Multiple Choice)
4.7/5
(35)

Adding to a variable is called ____________________ the variable.

(Short Answer)
4.7/5
(35)
Match each term with a statement below.
To add to a variable
accumulator
A variable that you use to gather values
step value
To decrease a variable's value
nested loops
Correct Answer:
Verified
Premises:
Responses:
To add to a variable
accumulator
A variable that you use to gather values
step value
To decrease a variable's value
nested loops
Initialized before entering a while loop
loop
One set of instructions that operates on multiple, separate sets of data
forcing
Any numeric variable you use to count the number of times an event has occurred
increment
The amount by which a for loop control variable changes
counter
Loops within loops
indefinite
A loop that may execute a different number of times each time the program executes
decrement
To override incorrect data by setting the variable to a specific, predetermined value
loop control variable
(Matching)
4.7/5
(33)

It is the programmer's responsibility to initialize all variables that must start with a specific value.

(True/False)
4.8/5
(31)

In some cases, a loop control variable does not have to be initialized.

(True/False)
4.8/5
(38)

A(n) ____ is any numeric variable you use to count the number of times an event has occurred.

(Multiple Choice)
4.7/5
(42)

A comparison is correct only when the correct ____ and operator are used.

(Multiple Choice)
4.7/5
(25)

In a ____, the loop body might never execute because the question controlling the loop might be false the first time it is asked.

(Multiple Choice)
4.9/5
(39)

You usually use the for loop with ____ loops.

(Multiple Choice)
4.9/5
(35)

When one loop appears inside another, the loop that is contained is called the ____________________ loop.

(Short Answer)
4.8/5
(39)

Many loop control variable values are altered by ____, or adding to them.

(Multiple Choice)
4.8/5
(42)

A mistake programmers often make with loops is that they ____.

(Multiple Choice)
4.8/5
(36)

Once your logic enters the body of a structured loop, ____.

(Multiple Choice)
4.8/5
(42)

You can either increment or decrement the loop control variable.

(True/False)
4.7/5
(45)

What are the tasks performed by the for count = 0 to 3 statement?

(Essay)
4.9/5
(42)

When one loop appears inside another, the loop that contains the other loop is called the ____ loop.

(Multiple Choice)
4.8/5
(38)

Loops are frequently used to ____; that is, to make sure it is meaningful and useful.

(Multiple Choice)
4.9/5
(34)
Showing 21 - 40 of 51
close modal

Filters

  • Essay(0)
  • Multiple Choice(0)
  • Short Answer(0)
  • True False(0)
  • Matching(0)