Exam 6: Value-Returning functions and Modules
Exam 1: Introduction to Computers and Programming35 Questions
Exam 2: Input, Processing, and Output35 Questions
Exam 3: Simple functions34 Questions
Exam 4: Decision Structures and Boolean Logic35 Questions
Exam 5: Repetition Structures35 Questions
Exam 6: Value-Returning functions and Modules35 Questions
Exam 7: files and Exceptions35 Questions
Exam 8: Lists and Tuples35 Questions
Exam 9: More About Strings35 Questions
Exam 10: Dictionaries and Sets35 Questions
Exam 11: Classes and Object-Oriented Programming35 Questions
Exam 12: Inheritance35 Questions
Exam 13: Recursion35 Questions
Exam 14: GUI Programming35 Questions
Select questions type
In Python, there is no restriction on the name of a module file.
Free
(True/False)
4.7/5
(35)
Correct Answer:
False
In a menu-driven program, what statement is used to determine and carry out the user's desired action?
Free
(Multiple Choice)
4.8/5
(41)
Correct Answer:
B
Unlike other languages, in Python, the number of values a function can return is limited to one.
Free
(True/False)
4.8/5
(34)
Correct Answer:
False
Which of the following functions returns the largest integer that is less than or equal to x?
(Multiple Choice)
5.0/5
(33)
functions in the standard library are stored in files that are known as _______________.
(Short Answer)
4.8/5
(40)
The randrange function returns a randomly selected value from a specific sequence of numbers.
(True/False)
4.7/5
(49)
The Python library functions that are built into the Python _____ can be used by simply calling the function.
(Multiple Choice)
4.7/5
(33)
What does the following statement mean? num1, num2 = get_num()
(Multiple Choice)
4.8/5
(38)
The math function, atan(x), returns one tangent of x in radians.
(True/False)
4.9/5
(29)
What makes it easier to reuse the same code in more than one program?
(Multiple Choice)
4.9/5
(39)
A(n) _______________ program displays a list of the operations on the screen and allows the user to select the operation that the program should perform.
(Short Answer)
4.8/5
(34)
The _______________ chart is an effective tool that programmers use for designing and documenting functions.
(Short Answer)
4.9/5
(47)
To refer to a function in a module, in our program we have to use the _______________ notation.
(Short Answer)
4.8/5
(43)
The term _______________ is used to describe any mechanism that accepts input, performs some operation that cannot be seen, and produces output.
(Short Answer)
4.9/5
(36)
What type of function can be used to determine whether a number is even or odd?
(Multiple Choice)
4.7/5
(41)
Given the following function definition, what would the statement print magic(5) display? def magic(num):
Return num + 2 * 10
(Multiple Choice)
4.8/5
(46)
Which of the following statements causes the interpreter to load the contents of the random module into memory?
(Multiple Choice)
4.8/5
(42)
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
(41)
In a menu-driven program, a loop structure is used to determine the menu item the user selected.
(True/False)
4.9/5
(33)
Showing 1 - 20 of 35
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)