stud
bud
Sign up
Log in
Home
Library
Explore
SAT
More
13_Python Module Flashcards | StudBud
Explore
/
13_Python Module
How can you create a Python package?
What is a Python module?
13_Python Module
8 terms
·
StudBud Administration
·
20 plays
Imported from external platform
Flashcards
8 cards
F
Practice quiz
P
Host live
L
Questions
8
Answers
1
What is a Python module?
A programming language
A type of Python data structure
A built-in function
A collection of Python functions and global variables
2
How can you create a Python package?
by creating a text file with a list of module names
by creating a directory with a special ‘init.py’ file
by importing modules from other packages
by using the ‘package’ keyword followed by the package name
3
How can you install a third-party Module in Python?
by importing the module directly from the internet
using the ‘pip’ command followed by the module name
by copying the module file into the Python installation directory
by downloading the module from a website and including it in your project
4
What is the purpose of the ‘random’ module in Python?
To manipulate strings
To generate random numbers
To handle file I/O operations
To perform mathematical perations
5
How can you remove a module from memory in Python?
by using the ‘del’ keyword followed by the module name
by deleting the module file from the filesystem
by using the ‘unload’ function from the ‘memory’ module
by restarting the Python interpreter
6
Which keyword is used to import a module in Python?
use
include
import
require
7
Which of the following statements is true about packages in Python?
Packages are collections of modules
Packages are collections of functions
Packages are used for mathematical operations
Packages are used for string manipulation
8
How can you import a specific function from a module in Python?
using the ‘import’ keyword followed by the module name separated by a dot
using the ‘import’ keyword followed by the function name
using the ‘use’ keyword followed by the module name separated by a dot
using the ‘require’ keyword followed by the function name