
Exploring Python Modules and Packages
Authored by John Chapman
Computers
11th Grade
Used 3+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
15 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the correct syntax to import a module named `math` in Python?
`import math`
`include math`
`require math`
`use math`
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following commands is used to install a package using pip?
`pip install package_name`
`pip get package_name`
`pip fetch package_name`
`pip add package_name`
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the purpose of the `__init__.py` file in a Python package?
It initializes the package and can be used to execute package-level code.
It contains the main function of the package.
It is used to store package metadata.
It is used to list all modules in the package.
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How can you import only the `sqrt` function from the `math` module?
`import math.sqrt`
`from math import sqrt`
`import sqrt from math`
`use math.sqrt`
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is a standard library in Python?
`numpy`
`pandas`
`os`
`requests`
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the command to list all installed packages using pip?
`pip list`
`pip show`
`pip display`
`pip packages`
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
If you have a module named `mymodule.py`, how would you import it in another Python script?
`import mymodule`
`include mymodule`
`require mymodule`
`use mymodule`
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
REVISION-Primary & Secondary Storage
Quiz
•
10th - 11th Grade
20 questions
Online Platform Block Q
Quiz
•
11th - 12th Grade
15 questions
Chapter 3: Storage devices and media (Part 2):
Quiz
•
10th - 11th Grade
11 questions
What is a computer
Quiz
•
KG - University
15 questions
Disk Management and Boot Sequence Vocab
Quiz
•
9th - 12th Grade
10 questions
Working with tables
Quiz
•
5th - 12th Grade
10 questions
E-Tech Lesson 1
Quiz
•
11th Grade
11 questions
Cascading Style Sheets
Quiz
•
8th - 12th Grade
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