Unit 6 Reviewing Basics Quiz

Pataasin ang iyong marka sa homework at exams ngayon gamit ang Quizwiz!

The expression list(map(math.sqrt, [9, 25, 36])) evaluates to -(3, 5, 6) -[81, 625, 1296] -[3.0, 5.0, 6.0] -70

[3.0, 5.0, 6.0]

The expression list(filter(lambda x: x > 50, [34, 65, 10, 100])) evaluates to -[] -(34, 10) -[65, 100] -[34, 10]

[65, 100]

A data structure used to implement a jump table is a -list -method -dictionary -tuple

dictionary

When a recursive function is called, the values of its arguments and its return address are placed in a -list -stack frame -set -dictionary

stack frame

The lifetime of a parameter is -the duration of its function's execution -the duration of program execution -the duration of its keyword's execution -the duration of its argument's execution

the duration of its function's execution

The scope of a temporary variable is -the entire module in which the variable is introduced -the statements in the body of the function where the variable is introduced -the set of the variables values -the statements in the body of the function after the statement where the variable is introduced

the statements in the body of the function after the statement where the variable is introduced

A recursive function -usually runs faster than the equivalent loop -calls another function multiple times -has a changing algorithm each time it is called -usually runs more slowly than the equivalent loop

usually runs more slowly than the equivalent loop

Top-down design is a strategy that: -uses a diagram that shows the relationships among a program's function and the passage of data between them -develops lower-level functions before the functions that depend on those lower-level functions -uses an algorithm for solving a class of problems -starts with the main function and develops the functions on each successive level beneath the main function

starts with the main function and develops the functions on each successive level beneath the main function

The relationships among functions in a top-down design are shown in a(n) -structure chart -syntax diagram -flow diagram -abstraction chart

structure chart

The expression reduce(max, [34, 21, 99, 67, 10]) evaluates to -0 -231 -99 -10

99


Kaugnay na mga set ng pag-aaral

principles of marketing chapter 13

View Set

Measuring and Recording Apical Pulse

View Set

AP Psychology Operant Conditioning and Cognitive Learning

View Set

The Point: Chapter 22 Neurodevelopmental Disorders

View Set

Plantinga "The Free Will Defense"

View Set