15 Modules & Packaging questions from the Python bank, written for Indian campus drives and tech interviews. Every question has a verified answer and an AI-tutor explanation on placd.
Free to start: the 2-minute IT readiness check — six questions and a result.
A.a single .py file whose top-level names become attributes importable elsewhere
B.an isolated directory with its own interpreter and installed packages, keeping project dependencies separate
C.the standardized configuration file declaring build system, metadata, and dependencies for a project
D.a directory of related modules, traditionally marked by an __init__ file, imported as a namespace
Answer + AI explanation with Pro
2. Which term means: "a single .py file whose top-level names become attributes importable elsewhere"?
Junior
A.pyproject.toml
B.virtual environment
C.__name__ guard
D.module
Answer + AI explanation with Pro
3. Which statement is correct?
Junior
A.module — the if check comparing the module's name to "__main__" to run code only when executed directly, not imported
B.module — a single .py file whose top-level names become attributes importable elsewhere
C.module — a directory of related modules, traditionally marked by an __init__ file, imported as a namespace
D.module — the standardized configuration file declaring build system, metadata, and dependencies for a project
Answer + AI explanation with Pro
4. What is package?
Junior
A.the if check comparing the module's name to "__main__" to run code only when executed directly, not imported
B.an isolated directory with its own interpreter and installed packages, keeping project dependencies separate
C.a single .py file whose top-level names become attributes importable elsewhere
D.a directory of related modules, traditionally marked by an __init__ file, imported as a namespace
Answer + AI explanation with Pro
5. Which term means: "a directory of related modules, traditionally marked by an __init__ file, imported as a namespace"?
Junior
A.pyproject.toml
B.__name__ guard
C.virtual environment
D.package
Answer + AI explanation with Pro
6. Which statement is correct?
Junior
A.package — an isolated directory with its own interpreter and installed packages, keeping project dependencies separate
B.package — a directory of related modules, traditionally marked by an __init__ file, imported as a namespace
C.package — a single .py file whose top-level names become attributes importable elsewhere
D.package — the standardized configuration file declaring build system, metadata, and dependencies for a project
Answer + AI explanation with Pro
7. What is __name__ guard?
Mid
A.the if check comparing the module's name to "__main__" to run code only when executed directly, not imported
B.a directory of related modules, traditionally marked by an __init__ file, imported as a namespace
C.an isolated directory with its own interpreter and installed packages, keeping project dependencies separate
D.a single .py file whose top-level names become attributes importable elsewhere
Answer + AI explanation with Pro
8. Which term means: "the if check comparing the module's name to "__main__" to run code only when executed directly, not imported"?
Mid
A.__name__ guard
B.virtual environment
C.pyproject.toml
D.module
Answer + AI explanation with Pro
9. Which statement is correct?
Mid
A.__name__ guard — a single .py file whose top-level names become attributes importable elsewhere
B.__name__ guard — a directory of related modules, traditionally marked by an __init__ file, imported as a namespace
C.__name__ guard — an isolated directory with its own interpreter and installed packages, keeping project dependencies separate
D.__name__ guard — the if check comparing the module's name to "__main__" to run code only when executed directly, not imported
Answer + AI explanation with Pro
10. What is pyproject.toml?
Mid
A.a single .py file whose top-level names become attributes importable elsewhere
B.the standardized configuration file declaring build system, metadata, and dependencies for a project
C.a directory of related modules, traditionally marked by an __init__ file, imported as a namespace
D.the if check comparing the module's name to "__main__" to run code only when executed directly, not imported
Answer + AI explanation with Pro
11. Which term means: "the standardized configuration file declaring build system, metadata, and dependencies for a project"?
Mid
A.module
B.pyproject.toml
C.virtual environment
D.__name__ guard
Answer + AI explanation with Pro
12. Which statement is correct?
Mid
A.pyproject.toml — the standardized configuration file declaring build system, metadata, and dependencies for a project
B.pyproject.toml — an isolated directory with its own interpreter and installed packages, keeping project dependencies separate
C.pyproject.toml — a single .py file whose top-level names become attributes importable elsewhere
D.pyproject.toml — the if check comparing the module's name to "__main__" to run code only when executed directly, not imported
Answer + AI explanation with Pro
13. What is virtual environment?
Senior
A.a directory of related modules, traditionally marked by an __init__ file, imported as a namespace
B.an isolated directory with its own interpreter and installed packages, keeping project dependencies separate
C.the standardized configuration file declaring build system, metadata, and dependencies for a project
D.a single .py file whose top-level names become attributes importable elsewhere
Answer + AI explanation with Pro
14. Which term means: "an isolated directory with its own interpreter and installed packages, keeping project dependencies separate"?
Senior
A.module
B.__name__ guard
C.virtual environment
D.pyproject.toml
Answer + AI explanation with Pro
15. Which statement is correct?
Senior
A.virtual environment — the standardized configuration file declaring build system, metadata, and dependencies for a project
B.virtual environment — the if check comparing the module's name to "__main__" to run code only when executed directly, not imported
C.virtual environment — a directory of related modules, traditionally marked by an __init__ file, imported as a namespace
D.virtual environment — an isolated directory with its own interpreter and installed packages, keeping project dependencies separate
Answer + AI explanation with Pro
Free to start
Start with a free readiness check
Sign up free for the 2-minute IT readiness check and a scored result. Answers, explanations and the AI tutor on every Modules & Packaging question come with Pro.