Filters
Question type

Study Flashcards

A method reference always uses an object, which can be denoted by a string followed by a dot and the method name.

A) True
B) False

Correct Answer

verifed

verified

A recursive function must contain at least one repetition statement.

A) True
B) False

Correct Answer

verifed

verified

A black-box chart is a diagram that shows the relationships among a program's functions and the passage of data between them.

A) True
B) False

Correct Answer

verifed

verified

False

A Python function cannot under normal circumstances reference a module variable for its value.

A) True
B) False

Correct Answer

verifed

verified

What is the call stack used for in the Python virtual machine?


A) The call stack is an area of reserved memory used to store chunks of memory related to functions.
B) The call stack is an area of reserved memory used to perform system calls for access to hardware.
C) The call stack is a log of called functions and methods within the program.
D) The call stack is a temporary storage area for junk data.

E) B) and D)
F) A) and B)

Correct Answer

verifed

verified

Recursive functions tend to be more complicated than the corresponding loops.

A) True
B) False

Correct Answer

verifed

verified

An abstraction hides detail and thus allows a person to view many things as just one thing.

A) True
B) False

Correct Answer

verifed

verified

The gradual process of developing functions to solve each subproblem in a top-down design is known as what process?


A) procedural refinement
B) stepwise refinement
C) progressing resolution
D) incremental solving

E) B) and D)
F) B) and C)

Correct Answer

verifed

verified

B

In bottom-up design, you decompose a complex problem into a set of simpler problems and solve these with different functions.

A) True
B) False

Correct Answer

verifed

verified

Where can the required arguments for a function be found?


A) In the function header.
B) In the module docstring.
C) In the function keyword list.
D) In the function's return list.

E) A) and C)
F) A) and B)

Correct Answer

verifed

verified

In Python, functions are treated as first-class data objects. What does this mean?


A) It means that they are considered to be global variables inside any Python code.
B) It means that the functions are given higher priority over resource access than regular chunks of code.
C) It means that functions are protected objects and are not easily imported from other modules, unless the author desires it.
D) It means that functions can be assigned to variables, passed as arguments to other functions, returned as values, and stored in data structures.

E) B) and D)
F) B) and C)

Correct Answer

verifed

verified

In a case of infinite recursion, the Python virtual machine eventually runs out of memory resources to manage the process, so it halts execution with an error message.

A) True
B) False

Correct Answer

verifed

verified

True

Smart compilers exist that can optimize some recursive functions by translating them to iterative machine code.

A) True
B) False

Correct Answer

verifed

verified

What are the two different ways that default arguments can be provided to a function? (Choose two.)


A) By supplying arguments in which they occur in the function header.
B) By using a reference pointer variable.
C) By overloading the function and redefining the arguments.
D) By assigning values to the keys in the function header.

E) A) and B)
F) A) and C)

Correct Answer

verifed

verified

Each box in a structure chart is labeled with a module name.

A) True
B) False

Correct Answer

verifed

verified

Recursive functions are frequently used to design algorithms for computing values that have a recursive definition.

A) True
B) False

Correct Answer

verifed

verified

The assignment of roles and responsibilities to different actors in a program is also called responsibility-driven design.

A) True
B) False

Correct Answer

verifed

verified

When a call returns or completes its execution, the memory for the stack frame is reallocated.

A) True
B) False

Correct Answer

verifed

verified

What term describes a dictionary of functions keyed by command names?


A) command table
B) jump table
C) skip table
D) function table

E) B) and D)
F) B) and C)

Correct Answer

verifed

verified

What can often provide you with a pattern for designing the structure of a program?


A) The structure of the problem you're attempting to solve.
B) The structure of code written by other people.
C) The structure of an organization's workforce.
D) The structure of the programming language used.

E) C) and D)
F) B) and D)

Correct Answer

verifed

verified

Showing 1 - 20 of 50

Related Exams

Show Answer