Exam 5: Functions and Modules

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

Unlike other languages, in Python, the number of values a function can return is limited to one.

Free
(True/False)
4.9/5
(38)
Correct Answer:
Verified

False

One of the reasons not to use global variables is that it makes a program hard to debug.

Free
(True/False)
5.0/5
(40)
Correct Answer:
Verified

True

A(n) _______________ chart is a visual representation of the relationships between functions.

Free
(Short Answer)
4.9/5
(34)
Correct Answer:
Verified

hierarchy

The randrange function returns a randomly selected value from a specific sequence of numbers.

(True/False)
4.8/5
(40)

The approach of _______________ makes the program easier to understand, test, and maintain.

(Short Answer)
4.9/5
(32)

The term _______________ is used to describe any mechanism that accepts input, performs some operation that cannot be seen, and produces output.

(Short Answer)
5.0/5
(42)

Python allows for passing multiple arguments to a function.

(True/False)
4.9/5
(27)

A function definition specifies what a function does and causes the function to execute.

(True/False)
4.9/5
(44)

The _____ argument specifies which parameter the argument should be passed into.

(Multiple Choice)
4.8/5
(29)

In a menu-driven program, a loop structure is used to determine the menu item the user selected.

(True/False)
4.8/5
(30)

Boolean functions are useful for simplifying complex conditions that are tested in decision and repetition structures.

(True/False)
4.8/5
(31)

Python comes with _____ functions that have been already prewritten for the programmer.

(Multiple Choice)
4.7/5
(43)

A(n) _____ is any piece of data that is passed into a function when the function is called.

(Multiple Choice)
4.8/5
(36)

In Python, a module's file name should end in _______________.

(Short Answer)
4.9/5
(33)

The code for a function is known as a function _______________.

(Short Answer)
4.8/5
(39)

Which of the following functions returns the largest integer that is less than or equal to x?

(Multiple Choice)
4.8/5
(43)

One of the drawbacks of a modularized program is that the only structure we could use is sequence structure.

(True/False)
4.7/5
(24)

The main function contains a program's _______________ logic, which is the overall logic of the program.

(Short Answer)
4.8/5
(37)

In a value-returning function, the value of the expression that follows the key word _____ will be sent back to the part of the program that called the function.

(Multiple Choice)
4.7/5
(34)

The return values of the trigonometric functions in Python are in _______________.

(Short Answer)
4.7/5
(32)
Showing 1 - 20 of 69
close modal

Filters

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