- Home
- Python Institute
- PCPP-32-101
- PythonInstitute.PCPP-32-101.v2026-08-10.q34 Practice Test (Page 2)
PCPP-32-101 Exam Question 1
What is ElementTree?
Correct Answer: D
ElementTree is a Python built-in module that provides a simple and efficient API for parsing and creating XML data. It allows you to access and manipulate XML data in a very straightforward way, making it easy to write XML processing applications.
Reference: Official Python documentation on ElementTree: https://docs.python.org/3/library/xml.etree.
elementtree.html
This statement is true because ElementTree is a module in the standard library of Python that provides an API for working with XML data. The module supports parsing XML from strings or files, creating XML trees from scratch or modifying existing ones, searching and iterating over XML elements, and writing XML data to strings or files.
Reference: Official Python documentation on ElementTree: https://docs.python.org/3/library/xml.etree.
elementtree.html
This statement is true because ElementTree is a module in the standard library of Python that provides an API for working with XML data. The module supports parsing XML from strings or files, creating XML trees from scratch or modifying existing ones, searching and iterating over XML elements, and writing XML data to strings or files.
PCPP-32-101 Exam Question 2
Select the true statements about the connection-oriented and connectionless types of communication. (Select two answers.)
Correct Answer: A,D
A). In the context of TCP/IP networks, the communication side that initiates a connection is called the client, whereas the side that answers the client is called the server.
This statement is true because TCP/IP networks use a client-server model to establish connection-oriented communications. The client is the device or application that requests a service or resource from another device or application, which is called the server. The server responds to the client's request and provides the service or resource. For example, when you browse a website using a web browser, the browser acts as a client and sends a request to the web server that hosts the website. The web server acts as a server and sends back the requested web page to the browser 1 .
B). Connectionless communications are usually built on top of TCP.
This statement is false because TCP (Transmission Control Protocol) is a connection-oriented protocol that requires establishing and terminating a connection before and after sending data. Connectionless communications are usually built on top of UDP (User Datagram Protocol), which is a connectionless protocol that does not require any connection setup or teardown. UDP simply sends data packets to the destination without checking if they are received or not 2 .
C). Using walkie-talkies is an example of a connection-oriented communication.
This statement is false because using walkie-talkies is an example of a connectionless communication. Walkie- talkies do not establish a dedicated channel or connection between the sender and receiver before transmitting data. They simply broadcast data over a shared frequency without ensuring that the receiver is ready or available to receive it. The sender does not know if the receiver has received the data or not 3 .
D). A phone call is an example of a connection-oriented communication.
This statement is true because a phone call is an example of a connection-oriented communication. A phone call requires setting up a circuit or connection between the caller and callee before exchanging voice data. The caller and callee can hear each other's voice and know if they are connected or not. The phone call also requires terminating the connection when the conversation is over 4 .
References:
1 : https://www.techtarget.com/searchnetworking/definition/client-server 2 : https://www.javatpoint.com
/connection-oriented-vs-connectionless-service 3 : https://en.wikipedia.org/wiki/Walkie-talkie 4 : https://en.
wikipedia.org/wiki/Telephone_call
A is true because in the context of TCP/IP networks, the communication side that initiates a connection is called the client, and the side that answers the client is called the server. This is the basis for establishing a connection-oriented communication.
D is true because a phone call is an example of a connection-oriented communication. Like TCP/IP, a phone call establishes a connection between two devices (in this case, two phones) before communication can occur.
A is true because in the context of TCP/IP networks, the communication side that initiates a connection is called the client, and the side that answers the client is called the server. This is the basis for establishing a connection-oriented communication.
D is true because a phone call is an example of a connection-oriented communication. Like TCP/IP, a phone call establishes a connection between two devices (in this case, two phones) before communication can occur.
B is false because connectionless communications are usually built on top of UDP, not TCP. UDP is a connectionless protocol that does not establish a connection before sending data.
C is false because using walkie-talkies is an example of a connectionless communication. Walkie-talkies do not establish a connection before communication begins, and messages are simply broadcasted to all devices within range.
Here is a sample code in Python using the socket module to create a TCP server and client to demonstrate the connection-oriented communication:
Server-side code:
import socket
HOST = '127.0.0.1'
PORT = 8080
with socket. socket (socket.AF_INET, socket.SOCK_STREAM) as s:
s. bind ((HOST, PORT))
s. listen ()
conn, addr = s. accept ()
with conn:
print ( 'Connected by' , addr)
while True:
data = conn. recv ( 1024 )
if not data:
break
conn. sendall (data)
Client-side code:
import socket
HOST = '127.0.0.1'
PORT = 8080
with socket. socket (socket.AF_INET, socket.SOCK_STREAM) as s:
s. connect ((HOST, PORT))
s. sendall (b ' Hello, world ' )
data = s. recv ( 1024 )
print ( 'Received' , repr (data))
The server listens for incoming connections on port 8080, and when a connection is established, it prints the address of the client that has connected. The server then continuously receives data from the client and sends it back to the client until the connection is closed.
The client establishes a connection with the server and sends the message "Hello, world" encoded as bytes. It then waits for a response from the server and prints the data it receives.
This statement is true because TCP/IP networks use a client-server model to establish connection-oriented communications. The client is the device or application that requests a service or resource from another device or application, which is called the server. The server responds to the client's request and provides the service or resource. For example, when you browse a website using a web browser, the browser acts as a client and sends a request to the web server that hosts the website. The web server acts as a server and sends back the requested web page to the browser 1 .
B). Connectionless communications are usually built on top of TCP.
This statement is false because TCP (Transmission Control Protocol) is a connection-oriented protocol that requires establishing and terminating a connection before and after sending data. Connectionless communications are usually built on top of UDP (User Datagram Protocol), which is a connectionless protocol that does not require any connection setup or teardown. UDP simply sends data packets to the destination without checking if they are received or not 2 .
C). Using walkie-talkies is an example of a connection-oriented communication.
This statement is false because using walkie-talkies is an example of a connectionless communication. Walkie- talkies do not establish a dedicated channel or connection between the sender and receiver before transmitting data. They simply broadcast data over a shared frequency without ensuring that the receiver is ready or available to receive it. The sender does not know if the receiver has received the data or not 3 .
D). A phone call is an example of a connection-oriented communication.
This statement is true because a phone call is an example of a connection-oriented communication. A phone call requires setting up a circuit or connection between the caller and callee before exchanging voice data. The caller and callee can hear each other's voice and know if they are connected or not. The phone call also requires terminating the connection when the conversation is over 4 .
References:
1 : https://www.techtarget.com/searchnetworking/definition/client-server 2 : https://www.javatpoint.com
/connection-oriented-vs-connectionless-service 3 : https://en.wikipedia.org/wiki/Walkie-talkie 4 : https://en.
wikipedia.org/wiki/Telephone_call
A is true because in the context of TCP/IP networks, the communication side that initiates a connection is called the client, and the side that answers the client is called the server. This is the basis for establishing a connection-oriented communication.
D is true because a phone call is an example of a connection-oriented communication. Like TCP/IP, a phone call establishes a connection between two devices (in this case, two phones) before communication can occur.
A is true because in the context of TCP/IP networks, the communication side that initiates a connection is called the client, and the side that answers the client is called the server. This is the basis for establishing a connection-oriented communication.
D is true because a phone call is an example of a connection-oriented communication. Like TCP/IP, a phone call establishes a connection between two devices (in this case, two phones) before communication can occur.
B is false because connectionless communications are usually built on top of UDP, not TCP. UDP is a connectionless protocol that does not establish a connection before sending data.
C is false because using walkie-talkies is an example of a connectionless communication. Walkie-talkies do not establish a connection before communication begins, and messages are simply broadcasted to all devices within range.
Here is a sample code in Python using the socket module to create a TCP server and client to demonstrate the connection-oriented communication:
Server-side code:
import socket
HOST = '127.0.0.1'
PORT = 8080
with socket. socket (socket.AF_INET, socket.SOCK_STREAM) as s:
s. bind ((HOST, PORT))
s. listen ()
conn, addr = s. accept ()
with conn:
print ( 'Connected by' , addr)
while True:
data = conn. recv ( 1024 )
if not data:
break
conn. sendall (data)
Client-side code:
import socket
HOST = '127.0.0.1'
PORT = 8080
with socket. socket (socket.AF_INET, socket.SOCK_STREAM) as s:
s. connect ((HOST, PORT))
s. sendall (b ' Hello, world ' )
data = s. recv ( 1024 )
print ( 'Received' , repr (data))
The server listens for incoming connections on port 8080, and when a connection is established, it prints the address of the client that has connected. The server then continuously receives data from the client and sends it back to the client until the connection is closed.
The client establishes a connection with the server and sends the message "Hello, world" encoded as bytes. It then waits for a response from the server and prints the data it receives.
PCPP-32-101 Exam Question 3
Select the true statement about PEP 8 recommendations related to line breaks and binary operators.
Correct Answer: A
According to PEP 8, Python's official style guide, line breaks before binary operators produce more readable code, especially in code blocks with long expressions. This is stated in several sources (1,2,6,8) and is a widely accepted convention.
References:
https://www.python.org/dev/peps/pep-0008/#should-a-line-break-before-or-after-a-binary-operator
https://stackoverflow.com/questions/30614124/are-long-lines-broken-up-before-or-after-binary-operators-in-python
https://www.quora.com/What-is-PEP-8-Python
https://www.techbeamers.com/python-tutorial-pep-8/
https://www.section.io/engineering-education/python-coding-conventions-guidelines-for-python-programming/
https://towardsdatascience.com/a-step-in-pep8-style-guide-improving-the-readability-of-the-code-8114fd4ccefa
https://www.codementor.io/@rishikeshdhokare/python-coding-style-best-practices-that-every-python-programmer-must-know-xybbcubb8
https://www.dataschool.io/python-pep8-tips-and-tricks/
References:
https://www.python.org/dev/peps/pep-0008/#should-a-line-break-before-or-after-a-binary-operator
https://stackoverflow.com/questions/30614124/are-long-lines-broken-up-before-or-after-binary-operators-in-python
https://www.quora.com/What-is-PEP-8-Python
https://www.techbeamers.com/python-tutorial-pep-8/
https://www.section.io/engineering-education/python-coding-conventions-guidelines-for-python-programming/
https://towardsdatascience.com/a-step-in-pep8-style-guide-improving-the-readability-of-the-code-8114fd4ccefa
https://www.codementor.io/@rishikeshdhokare/python-coding-style-best-practices-that-every-python-programmer-must-know-xybbcubb8
https://www.dataschool.io/python-pep8-tips-and-tricks/
PCPP-32-101 Exam Question 4
Which of the following is not a widget property?
Correct Answer: D
The correct answer is D. Tkinter widgets support many configuration options, and options such as width, underline, and highlightthickness are valid properties for relevant widgets. For example, width can define widget size, underline can specify which character should be underlined in text-based widgets, and highlightthickness controls the thickness of the focus highlight border. The option depth, however, is not a standard Tkinter widget configuration property. Tkinter widget options are specific names understood by the underlying Tk system, and unsupported names normally produce configuration errors when used. Therefore, among the listed options, depth is the one that does not belong as a Tkinter widget property.
PCPP-32-101 Exam Question 5
Select the correct statements about the csv module.
(Select two answers.)
(Select two answers.)
Correct Answer: B,D
The correct answers are B and D. In Python's csv module, a normal csv.reader object reads each CSV row as a list of strings, so option B is true. A csv.DictReader object reads each row into a dictionary, using field names as keys, so option D is also true. Option A is false because DictReader does not always take headers from the first row; field names can be provided explicitly through the fieldnames argument. Option C is false because DictWriter requires field names so it knows which dictionary keys correspond to CSV columns and in what order they should be written. This distinction between row lists and row dictionaries is central to CSV processing.
- Other Version
- 1364PythonInstitute.PCPP-32-101.v2023-06-15.q20
- Latest Upload
- 118Netskope.NSK200.v2026-08-11.q42
- 160Oracle.1Z0-997-25.v2026-08-11.q136
- 138Salesforce.Als-Con-201.v2026-08-11.q58
- 115SAP.C_ARP2P.v2026-08-11.q33
- 136VMware.250-608.v2026-08-11.q62
- 151Salesforce.Field-Service-Consultant.v2026-08-10.q68
- 131Juniper.JN0-232.v2026-08-10.q46
- 168Fortinet.NSE8_813.v2026-08-10.q108
- 132PythonInstitute.PCPP-32-101.v2026-08-10.q34
- 138PMI.PMP.v2026-08-10.q1026
[×]
Download PDF File
Enter your email address to download PythonInstitute.PCPP-32-101.v2026-08-10.q34 Practice Test
