
Python InstitutePCPP1 - Certified Professional Python Programmer 1
Domain 4Objective 2
PCPP-32-101 4.2 Work with Sockets in Python PCPP-32-1 Practice Questions (Page 4)
Part of the Network Programming domain, which accounts for 18% of the PCPP-32-1 exam. Python Institute does not publish an official question count, but from its 65-minute exam (~25–45 total, ~5–8 in this domain), expect 1–2 from this objective — we provide 23 practice questions to prepare you well beyond it. (estimate)
23questions here
5free pages
7concepts
18%of the exam
Questions 16–20
- 16
A script connects to a server and then waits for data. If the server does not respond within 5 seconds, the script should raise a timeout exception. Which code snippet correctly sets a timeout on the socket?
Select an answer first - 17
What does the first argument to socket.socket() specify?
Select an answer first - 18
Why is it important to call close() on a socket after finishing communication?
Select an answer first - 19
Which method is used to properly close a socket connection?
Select an answer first - 20
A script sends a large HTTP request body to a server. The developer is concerned that send() may not send all data in one call. Which method should be used to ensure all data is sent?
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. “PCPP-32-1” is a trademark of its owner, used for identification only.