Exam 6: Looping

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

A(n) ____________________ is a body with no statements in it.

Free
(Short Answer)
4.9/5
(43)
Correct Answer:
Verified

empty body

One execution of any loop is called a(n) ____________________.

Free
(Short Answer)
4.9/5
(40)
Correct Answer:
Verified

iteration

You can use virtually any number of nested loops; however, at some point, your machine will no longer be able to store all the necessary looping information.

Free
(True/False)
4.9/5
(33)
Correct Answer:
Verified

True

You can initialize more than one variable in a for loop by placing a(n) ____ between the separate statements.

(Multiple Choice)
4.8/5
(40)

When creating a for loop, which statement will correctly initialize more than one variable?

(Multiple Choice)
4.9/5
(42)

How are indefinite loops used for validating data? Why is a loop structure typically the better choice for validating data than an if statement?

(Essay)
4.7/5
(34)

You use a unary minus sign preceding a value to make the value ____.

(Multiple Choice)
4.9/5
(35)

Why would a loop with altered user input be considered a type of indefinite loop? Give an example.

(Essay)
4.8/5
(33)

A statement that will alter the value of the loop control variable is included in the body of a loop.

(True/False)
4.8/5
(39)

Match each term with the correct statement below. -Within parentheses are three sections separated by exactly two semicolons

(Multiple Choice)
4.9/5
(41)

The statements that make up a loop body will continue to execute as long as the expression value remains false.

(True/False)
4.8/5
(39)

Match each term with the correct statement below. -Operate on two values

(Multiple Choice)
4.8/5
(35)

When loops are nested, each pair contains a(n) ____________________ loop and an outer loop.

(Short Answer)
4.9/5
(32)

Write a definite while loop that initializes a loop control variable named decreaseOne to 10 and continues until decreaseOne > 0. Decrement the loop control variable by 1 and include the println output "Keep going" within the loop.

(Essay)
4.8/5
(28)

An indefinite loop is a(n) ____ loop.

(Multiple Choice)
4.8/5
(39)

How could a programmer identify and escape from an infinite loop?

(Essay)
4.9/5
(42)

Before entering a loop, the first input, or ____, is retrieved.

(Multiple Choice)
4.7/5
(45)

In a do…while loop, the loop will continue to execute until ____.

(Multiple Choice)
4.9/5
(36)

Describe a counter-controlled loop. Explain the process of incrementing and decrementing, and explain the best method for executing a loop a specific number of times.

(Essay)
5.0/5
(32)

A for loop provides a convenient way to create a(n) ____ loop.

(Multiple Choice)
4.8/5
(38)
Showing 1 - 20 of 72
close modal

Filters

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