Exam 5: Functions and Modules

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

Which of the following statements causes the interpreter to load the contents of the random module into memory?

(Multiple Choice)
4.9/5
(40)

The _____ of a local variable is the function in which the variable is created.

(Multiple Choice)
4.7/5
(43)

The value assigned to a global constant can be changed in the mainline logic.

(True/False)
4.8/5
(38)

The first line in the function definition is known as the function _____.

(Multiple Choice)
4.7/5
(38)

The math function, ceil(x), returns the smallest integer that is greater than or equal to x.

(True/False)
5.0/5
(41)

What type of value is returned by the functions random and uniform?

(Multiple Choice)
4.8/5
(30)

A value-returning function has a(n) _______________ statement that returns a value back to the part of the program that called it.

(Short Answer)
4.9/5
(35)

A variable is visible only to statements in the variable's _______________.

(Short Answer)
4.8/5
(36)

Which of the following will assign a random number in the range of 1 through 50 to the variable number?

(Multiple Choice)
4.8/5
(36)

In Python, one can have a list of variables on the left side of the assignment operator.

(True/False)
4.9/5
(42)

When a function is called by its name, then it is _____.

(Multiple Choice)
4.7/5
(34)

The _____ design technique can be used to break down an algorithm into functions.

(Multiple Choice)
4.9/5
(40)

What is a group of statements that exists within a program for the purpose of performing a specific task?

(Multiple Choice)
4.8/5
(36)

Different functions can have local variables with the same names.

(True/False)
5.0/5
(41)

A set of statements that belong together as a group and contribute to the function definition is known as a(n) _____.

(Multiple Choice)
4.8/5
(37)

The Python library functions that are built into the Python _____ can be used by simply calling the function.

(Multiple Choice)
4.8/5
(34)

In a menu-driven program, what statement is used to determine and carry out the user's desired action?

(Multiple Choice)
4.8/5
(38)

The _______________ chart is an effective tool that programmers use for designing and documenting functions.

(Short Answer)
4.8/5
(38)

A(n) _____ is a variable that receives an argument that is passed into a function.

(Multiple Choice)
4.9/5
(30)

A local variable can be accessed from anywhere in the program.

(True/False)
4.8/5
(41)
Showing 41 - 60 of 69
close modal

Filters

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