Question 1
To get a better understanding of how recursion works, it is helpful to trace its calls.Correct Answer:
TrueQuestion 2
What is the lambda function in Python utilized for?Correct Answer:
a. Question 3
Recursive solutions are often more natural and elegant than their iterative counterparts.Correct Answer:
TrueQuestion 4
Most recursive functions expect no arguments.Correct Answer:
FalseQuestion 5
What higher-order function takes a list of values and repeatedly applies a function to accumulate a single data value?Correct Answer:
d. Question 6
The assignment of roles and responsibilities to different actors in a program is also called responsibility-driven design.Correct Answer:
TrueQuestion 7
The first five numbers of the Fibonacci sequence are 1 3 5 8 13.Correct Answer:
FalseQuestion 8
The amount of memory needed for a loop grows with the size of the problem's data set.Correct Answer:
FalseQuestion 9
In Python, functions are treated as first-class data objects. What does this mean?Correct Answer:
d. Question 10
What higher-order function process applies a function to each value in a sequence and returns a new sequence of the results?Correct Answer:
b. Question 11
When using functions that have default arguments, the required arguments must be provided and must be placed in the same positions as they are in the function definition's header.Correct Answer:
TrueQuestion 12
A Python function cannot under normal circumstances reference a module variable for its value.Correct Answer:
FalseQuestion 13
Where can the required arguments for a function be found?Correct Answer:
c. Question 14
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?Correct Answer:
d. Question 15
What happens when a function tries to assign or change a value of a variable that has been defined at the module level?Correct Answer:
c. Question 16
What is the call stack used for in the Python virtual machine?Correct Answer:
a. Question 17
In a recursive function, what is used to determine whether to stop or to continue with another recursive step?Correct Answer:
c. Question 18
What makes up a Python program's namespace?Correct Answer:
a. Question 19
An abstraction hides detail and thus allows a person to view many things as just one thing.Correct Answer:
TrueQuestion 20
The gradual process of developing functions to solve each subproblem in a top-down design is known as what process?Correct Answer:
d. Question 21
For each call of a function, the Python virtual machine must allocate a small chunk of memory on the call stack, which is known by what term?Correct Answer:
d. Question 22
What term describes a dictionary of functions keyed by command names?Correct Answer:
a. Question 23
The use of a common pool of data allows a program to grow easily as new data sources are added to the program.Correct Answer:
TrueQuestion 24
A program's namespace is the set of its variables and their values.Correct Answer:
TrueQuestion 25
What is the name for a diagram that shows the relationships among a program's functions and the passage of data between them?Correct Answer:
c.
0 comments:
Post a Comment