Exam 4: Repetition Structures

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

In a nested loop, the inner loop goes through all of its iterations for every single iteration of an outer loop.

(True/False)
4.9/5
(43)

The while loop is known as a(n) _______________ loop because it tests conditions before performing an iteration.

(Short Answer)
4.9/5
(29)

The _______________ function is a built-in function that generates a list of integer values.

(Short Answer)
4.8/5
(38)

In Python, you would use the _______________ statement to write a count-controlled loop.

(Short Answer)
4.8/5
(40)

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

(True/False)
4.9/5
(37)

A(n) _______________ structure causes a statement or set of statements to execute repeatedly.

(Short Answer)
4.8/5
(29)

Which of the following represents an example to calculate the sum of the numbers (accumulator)?

(Multiple Choice)
4.8/5
(37)

What is not an example of an augmented assignment operator?

(Multiple Choice)
4.8/5
(43)

In Python, a comma-separated sequence of data items that are enclosed in a set of brackets is called a _____.

(Multiple Choice)
4.8/5
(35)

What are the values that the variable num contains through the iterations of the following for loop? For num in range(4)

(Multiple Choice)
4.9/5
(49)

When will the following loop terminate? While keep_on_going != 999 :

(Multiple Choice)
4.9/5
(41)

What is the format for the while clause in Python?

(Multiple Choice)
4.9/5
(38)

_____ 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.8/5
(38)

In flowcharting, the decision structure and the repetition structure both use the diamond symbol to represent the condition that is tested.

(True/False)
4.9/5
(42)
Showing 21 - 34 of 34
close modal

Filters

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