Exam 5: Repetition Structures

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

A(n) _______________ validation loop is sometimes called an error trap or an error handler.

(Short Answer)
4.8/5
(40)

What are the values that the variable num contains through the iterations of the following for loop? for num in range(2, 9, 2)

(Multiple Choice)
4.9/5
(33)

A(n) _______________ total is a sum of numbers that accumulates with each iteration of a loop.

(Short Answer)
4.9/5
(34)

functions can be called from statements in the body of a loop, and loops can be called from the body of a function.

(True/False)
4.9/5
(38)

A better way to repeatedly perform an operation is to write the statements for the task once, and then place the statements in a loop that will repeat the statements as many times as necessary.

(True/False)
4.9/5
(35)

What is the disadvantage of coding in one long sequence structure?

(Multiple Choice)
4.8/5
(34)

The first input operation is called the _____, and its purpose is to get the first input value that will be tested by the validation loop.

(Multiple Choice)
4.8/5
(27)

A(n) _______________ loop usually occurs when the programmer forgets to write code inside the loop that makes the test condition false.

(Short Answer)
4.9/5
(43)

The acronym _______________ refers to the fact that the computer cannot tell the difference between good data and bad data.

(Short Answer)
4.7/5
(28)

The first line in the while loop is referred to as the condition clause.

(True/False)
4.9/5
(37)

What type of loop structure repeats the code based on the value of the Boolean expression?

(Multiple Choice)
4.9/5
(41)

The variable used to keep the running total is called a(n) _____.

(Multiple Choice)
5.0/5
(39)

What is not an example of an augmented assignment operator?

(Multiple Choice)
4.8/5
(36)

_____ is the process of inspecting data that has been input to a program to make sure it is valid before it is used in a computation.

(Multiple Choice)
4.9/5
(33)

Reducing duplication of code is one of the advantages of using a loop structure.

(True/False)
4.8/5
(45)
Showing 21 - 35 of 35
close modal

Filters

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