
Exploring Python Modules and Packages

Quiz
•
Computers
•
11th Grade
•
Medium
John Chapman
Used 3+ times
FREE Resource
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`
Create a free account and access millions of resources
Similar Resources on Wayground
10 questions
Mastering Python String Techniques

Quiz
•
9th - 12th Grade
17 questions
Micro:bit Python #1

Quiz
•
9th - 12th Grade
20 questions
Python Django - Assessment

Quiz
•
9th - 12th Grade
13 questions
Python Operators & Expressions

Quiz
•
8th - 11th Grade
20 questions
Tin 11 - Bài 3 - Câu hỏi trắc nghiệm

Quiz
•
11th Grade
20 questions
Unit 3 Python TEST

Quiz
•
11th - 12th Grade
20 questions
UH1_INFO_XII

Quiz
•
11th Grade
12 questions
Python Fundamentals

Quiz
•
6th - 11th Grade
Popular Resources on Wayground
10 questions
Video Games

Quiz
•
6th - 12th Grade
20 questions
Brand Labels

Quiz
•
5th - 12th Grade
15 questions
Core 4 of Customer Service - Student Edition

Quiz
•
6th - 8th Grade
15 questions
What is Bullying?- Bullying Lesson Series 6-12

Lesson
•
11th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
22 questions
Adding Integers

Quiz
•
6th Grade
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade