Filters
Question type

________________ arguments correspond with the associated parameters in a function call by their their name.

Correct Answer

verifed

verified

Calls to non-value-returning functions cannot be used anywhere that a statement is expected.

A) True
B) False

Correct Answer

verifed

verified

Match the following: -required in all value-returning functions


A) function header
B) function body (suite)
C) value-returning function
D) non-value-returning function
E) return statement

F) A) and E)
G) C) and D)

Correct Answer

verifed

verified

Match the following: -Python's version of a program routine


A) routine
B) function
C) formal parameter
D) actual argument
E) function invocation

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

Correct Answer

verifed

verified

As long as a function is defined somewhere in a program, it can be called anywhere within the program.

A) True
B) False

Correct Answer

verifed

verified

Keyword arguments are different from positional arguments, in that their name must be the same as the name of the corresponding parameter when calling a function.

A) True
B) False

Correct Answer

verifed

verified

Function calls to value-returning functions can be used anywhere that a function's return value is appropriate.

A) True
B) False

Correct Answer

verifed

verified

A function may be called one or more times within a program.

A) True
B) False

Correct Answer

verifed

verified

Examine the following function header: Def mortgagePayment(amount, rate, term) : Which of the following calls to function mortgagePayment is invalid in Python?


A) mortgagePayment(350000, 5.5, 30)
B) mortgagePayment(amount=350000, rate=5.5, term=30)
C) mortgagePayment(350000, rate=5.5, term=30)
D) mortgagePayment(350000, term=30, rate=5.5)
E) mortgagePayment(rate=5.5, term=30, 350000)

F) C) and D)
G) All of the above

Correct Answer

verifed

verified

Only arguments that are a mutable types can be altered when passed to a function.

A) True
B) False

Correct Answer

verifed

verified

Match the following: -called for its side effects


A) function header
B) function body (suite)
C) value-returning function
D) non-value-returning function
E) return statement

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

Correct Answer

verifed

verified

Variables defined within a function have ___________ scope.

Correct Answer

verifed

verified

Examine the following Python code: Examine the following Python code:   When calling this function, how many arguments would be passed to it? A)  3 B)  Zero C)  1 D)  2 E)  Any of the above When calling this function, how many arguments would be passed to it?


A) 3
B) Zero
C) 1
D) 2
E) Any of the above

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

Correct Answer

verifed

verified

Match the following: -contains the functions instructions


A) function header
B) function body (suite)
C) value-returning function
D) non-value-returning function
E) return statement

F) A) and E)
G) C) and E)

Correct Answer

verifed

verified

Each function in Python has its own local scope.

A) True
B) False

Correct Answer

verifed

verified

A __________________________ function is called for its side effects.

Correct Answer

verifed

verified

non-value-...

View Answer

A __________ is a named group of instructions performing some task.

Correct Answer

verifed

verified

The assignment of multiple variables in the same assignment statement in Python involving a call to a value-returning function is called ______________________________.

Correct Answer

verifed

verified

A function is a named group of instructions performing some task.

A) True
B) False

Correct Answer

verifed

verified

The lifetime of local variables is the same as global variables, except that they are only accessible from within the function they are defined in.

A) True
B) False

Correct Answer

verifed

verified

Showing 21 - 40 of 83

Related Exams

Show Answer