
Python InstitutePCAP - Certified Associate Python Programmer
Domain 1Objective 5
PCAP-31-03 1.5 Create and Use User-Defined Modules and Packages PCAP-31 Practice Questions (Page 3)
Part of the Modules and Packages domain, which accounts for 12% of the PCAP-31 exam. Python Institute does not publish an official question count, but from its 65-minute exam (~25–45 total, ~3–5 in this domain), expect 1–1 from this objective — we provide 30 practice questions to prepare you well beyond it. (estimate)
30questions here
6free pages
8concepts
12%of the exam
Questions 11–15
- 11
A developer is investigating why importing a large module `dataprocess.py` is slow on the first import but faster on subsequent imports in the same session. The developer notices a `__pycache__` directory was created. What is the most accurate explanation for the speed difference?
Select an answer first - 12
A developer notices that after importing a custom module `data_utils.py` multiple times in a single session, a `__pycache__` directory appears in the same folder. The developer wants to understand why the directory was created and whether it is safe to delete. Which statement accurately describes the purpose of `__pycache__`?
Select an answer first - 13
A developer has the following directory structure on disk: ``` project/ main.py utils/ helpers.py ``` The `utils` directory does NOT contain an `__init__.py` file. The developer wants to import `helpers` from `main.py`. Which import statement will work?
Select an answer first - 14
Which statement about private variables in a Python module is true?
Select an answer first - 15
What is the purpose of the `if __name__ == '__main__':` idiom in a Python file?
Select an answer first
Finished these 5 questions?
Review the revealed explanations, or continue through the curriculum.
Free Basic Practice is a study aid with revealable answers — not a scored exam. Examers.io is independent and not affiliated with or endorsed by Python Institute. “PCAP-31” is a trademark of its owner, used for identification only.