Exam 6: Design With Functions

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

What happens when a function tries to assign or change a value of a variable that has been defined at the module level?

(Multiple Choice)
4.9/5
(26)

How does top-down design work?

(Multiple Choice)
4.9/5
(33)

What are two common methods by which functions serve as abstraction mechanisms? (Choose two.)

(Multiple Choice)
4.9/5
(35)

When you design an algorithm, it should be general enough to provide a solution to many problem instances, not just one or a few of them.

(True/False)
4.9/5
(32)

To get a better understanding of how recursion works, it is helpful to trace its calls.

(True/False)
4.7/5
(25)

In a recursive function, what is used to determine whether to stop or to continue with another recursive step?

(Multiple Choice)
4.7/5
(38)

It is possible to construct any algorithm using only Python's built-in operators and control statements.

(True/False)
4.9/5
(43)

Which of the following statements are accurate? (Choose two.)

(Multiple Choice)
4.9/5
(39)

In Python, what is the term that is used to describe the area of a program text in which an object name refers to a given value?

(Multiple Choice)
4.8/5
(31)

The amount of memory needed for a loop grows with the size of the problem's data set.

(True/False)
4.8/5
(40)

What higher-order function process applies a function to each value in a sequence and returns a new sequence of the results?

(Multiple Choice)
4.9/5
(34)

What is the lambda function in Python utilized for?

(Multiple Choice)
4.8/5
(36)

A program's namespace is the set of its variables and their values.

(True/False)
4.8/5
(36)

The Fibonacci sequence is a series of values that can be easily calculated with what kind of function?

(Multiple Choice)
4.8/5
(39)

In what higher-order function do you apply a predicate to each value within a list, and if the predicate returns true, the value is added to an object?

(Multiple Choice)
4.9/5
(40)

The assignment of roles and responsibilities to different actors in a program is known as what type of design?

(Multiple Choice)
4.8/5
(38)

What is the name for a diagram that shows the relationships among a program's functions and the passage of data between them?

(Multiple Choice)
4.9/5
(44)

Most recursive functions expect no arguments.

(True/False)
4.8/5
(42)

The first five numbers of the Fibonacci sequence are 1 3 5 8 13.

(True/False)
4.9/5
(43)

Like with an infinite loop, an infinite recursion eventually halts execution with an error message.

(True/False)
4.8/5
(38)
Showing 21 - 40 of 50
close modal

Filters

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