
Python Modules and Packages
Authored by Lavakumar Gopu
Computers
University
Used 101+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
To put definitions in a file and use them in another scripts, we use_____
packages
functions
modules
project
2.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
Which of the following is not an advantage of using modules?
Provides a means of reuse of program code
Provides a means of dividing up tasks
Provides a means of reducing the size of the program
Provides a means of testing individual parts of the program
3.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
What will be the output of the following Python code?
from math import factorial
print(math.factorial(5))
120
Nothing is printed
Error, method factorial doesn’t exist in math module
Error, the statement should be: print(factorial(5))
4.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
Which of the following is false about “from-import” form of import?
The syntax is: from modulename import identifier
This form of import prevents name clash
The namespace of imported module becomes part of importing module
None of the Above
5.
MULTIPLE SELECT QUESTION
20 sec • 1 pt
A module consists of
functions
variables
packages
classes
6.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
Which of the following is true regarding a package
it is a python file
it is an executable file
it is a directory
ALL
7.
MULTIPLE SELECT QUESTION
20 sec • 1 pt
Which of the following are contained by packages
modules
files
__init__.py
packages
Access all questions and much more by creating a free account
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?
Similar Resources on Wayground
15 questions
Brewing JavaFX Quiz
Quiz
•
University
10 questions
Adobe Photoshop
Quiz
•
University
10 questions
Choose the level of Bloom’s Taxonomy
Quiz
•
University
14 questions
Linux: Users and Groups
Quiz
•
9th Grade - University
10 questions
Herencia y Paquetes
Quiz
•
University
15 questions
Graphs
Quiz
•
University
12 questions
Spreadsheet Starter
Quiz
•
7th Grade - University
14 questions
ISDATut3
Quiz
•
University
Popular Resources on Wayground
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
22 questions
fractions
Quiz
•
3rd Grade
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
15 questions
Equivalent Fractions
Quiz
•
4th Grade
20 questions
Figurative Language Review
Quiz
•
6th Grade