
Python InstitutePCAP - Certified Associate Python Programmer
Domain 5Objective 5
PCAP-31-03 5.5 Perform Input/output Operations PCAP-31 Practice Questions (Page 2)
Part of the Miscellaneous (List Comprehensions, Lambdas, Closures, I/O) domain, which accounts for 22% of the PCAP-31 exam. Python Institute does not publish an official question count, but from its 65-minute exam (~25–45 total, ~6–10 in this domain), expect 1–2 from this objective — we provide 21 practice questions to prepare you well beyond it. (estimate)
21questions here
5free pages
8concepts
22%of the exam
Questions 6–10
- 6
Which open() mode string should be used to read a binary file such as an image?
Select an answer first - 7
A developer is writing a script that generates a report. The script writes several sections to a file. After writing all sections, the developer wants to ensure the data is physically written to disk before the script continues to the next phase. What should the developer do?
Select an answer first - 8
Which errno constant is typically raised when a file exists but the current user does not have permission to open it?
Select an answer first - 9
What is the primary purpose of calling the close() method on a file object?
Select an answer first - 10
A developer needs to read the first 5 lines of a large log file for a quick preview. The file is too large to load entirely into memory. Which approach reads exactly the first 5 lines efficiently?
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.