Python Institute PCPP-32-101 Practice Exam Questions & Answers
Python Institute PCPP-32-101 Exam Details
Key details for this exam, checked against the published exam outline
- Exam Code
- PCPP-32-101
- Full Name
- PCPP1 - Certified Professional in Python Programming 1
- Issuing Body
- Python Institute
- Question Format (Our Bank)
- Multiple Choice
- Delivery
- Online proctored or at a Pearson VUE test centre
- Eligibility
- PCAP (Certified Associate in Python Programming) certification required
- Validity
- Lifetime - does not expire
- Full Question Set
- 45 questions Get All Questions
Free PCPP-32-101 Practice Questions
Each question shows the correct answer and an explanation of why it is right
Question 1 Domain 1 Section 1: Advance Object-Oriented Programming
Identify the accurate statement regarding composition
Composition is an object-oriented design principle that represents a has-a relationship. Within composition, a composite class holds an instance of another class, which is called the component. Put differently, a composite class possesses a component belonging to another class1.
1. Composition allows a class to be designed as a container for several different classes.
Composition in Python is a technique for constructing complex objects from simpler ones by aggregating one or more objects of another class as attributes. The aggregated objects are typically regarded as parts of the whole, and the enclosing object often serves as a container for these smaller objects.
Composition combines objects in a manner that offers more flexibility and easier modification than inheritance can. Through composition, new objects can be formed by merging existing ones, with a container object hosting other objects. In contrast, under inheritance, new objects extend the behavior of their parent classes and are constrained by that hierarchy.
Official Python documentation on Composition:https://docs.python.org/3/tutorial/classes.html#composition
GeeksforGeeks article on Composition vs Inheritance:https://www.geeksforgeeks.org/composition-vs-inheritance-python/
Real Python article on Composition and Inheritance:https://realpython.com/inheritance-composition-python/
Question 2 Domain 1 Section 1: Advance Object-Oriented Programming
Examine the function below and select the statement that most accurately characterizes it.

The snippet defines repeat, a decorator that accepts num_times, which sets how many times the decorated function is invoked. Calling repeat returns an inner function named wrapper_repeat, which takes a function func and returns a further inner function called wrapper that invokes func num_times times.
This snippet is therefore a decorator that accepts its own arguments. The @decorator_function syntax applies decorator_function to some_function. decorator_function takes an argument arg1 and defines an inner function wrapper_function that receives the original function func. wrapper_function then returns the result of calling func together with the arg1 value passed to decorator_function.
Consider how this decorator is used with some_function:
@decorator_function('argument 1')
def some_function():
return 'Hello world'
When some_function is invoked, it is first passed as an argument to decorator_function. decorator_function then appends the text 'argument 1' to the result of calling some_function() and returns the resulting string. Consequently, the final output is 'Hello world argument 1'.
Official Python documentation on decorators: https://docs.python.org/3/glossary.html#term-decorator
Question 3 Domain 3 Section 4: Network Programming
Which statement regarding the property decorator is incorrect?
The claim that the@propertydecorator must be placed after the method handling assignment to an encapsulated attribute is incorrect. Rather, the@propertydecorator needs to appear ahead of the method used to assign the attribute value. The@propertydecorator, together with the setter and deleter methods, forms an encapsulated attribute that lets you control the attribute's value.
Official Python documentation on Property:https://docs.python.org/3/library/functions.html#property
The@propertydecorator marks a method as the getter for an instance attribute. The method decorated with@propertymust be defined before any setter or deleter methods for that same attribute.
Get the complete PCPP-32-101 question set
$20$40
Question 4 Domain 1 Section 1: Advance Object-Oriented Programming
Which of these calls is most commonly used to make a socket object?
Socket objects are normally instantiated by calling the socket() constructor from Python's socket module. The proper call is socket.socket(socket_domain, socket_type), which produces a new socket object using the specified domain and type.
Question 5 Domain 1 Section 1: Advance Object-Oriented Programming
Which output is produced by the code below?

What does the snippet print when it runs?
This answer is correct because the code creates a logger object through the logging module and sets its level to logging.INFO. The logging module offers a way to report events that happen while a program runs. The logging level decides which events get reported and which are skipped. The module defines five severity levels: DEBUG, INFO, WARNING, ERROR, and CRITICAL. The lower the level, the more events get reported.
Next, the code sends two messages to the logger: one at the logging.DEBUG level and one at the logging.INFO level. The logger reports only messages whose level is equal to or higher than its own level. As a result, the logging.DEBUG message is skipped, while the logging.INFO message is reported. The default reporting format is ''level name: message''. Consequently, the output of the code is:
INFO: Loading data...
Question 6 Domain 2 Section 2: Coding Conventions, Best Practices, and Standardization
What occurs when the mam window lacks enough room to hold all of its widgets?
When the main window is too small to contain every widget, some widgets may be invisible. Therefore, Option A is the correct answer.
When a window cannot provide enough space to show all of its content, some widgets may be partly or fully concealed. The window does not automatically grow to accommodate its content, and no exception is raised. Widgets are also not automatically shrunk to match the window's size.
If the main window is too small for all of its widgets, some of them may be hidden or only partly visible. The reason is that the main window has a fixed size, so widgets that extend beyond its visible area fall outside it.
To prevent this problem, layout managers such as grid, pack, or place can be used to adjust the size and position of widgets dynamically as the window is resized. This keeps all widgets visible and properly arranged regardless of the main window's size.
https://www.tkdocs.com/tutorial/widgets.html#managers
https://www.geeksforgeeks.org/python-tkinter-widgets/
https://anzeljg.github.io/rin2/book2/2405/docs/tkinter/introduction.html
Question 7 Domain 2 Section 2: Coding Conventions, Best Practices, and Standardization
Which function or operator should be used to get a True or False answer to the question: "Do two variables refer to the same object?"
To check whether two variables point to the same object in memory, use the is operator. It returns True when both variables reference the same object in memory, and False otherwise.
For instance:
a = [1, 2, 3]
b = a
c = [1, 2, 3]
print(a is b) # True
print(a is c) # False
Here, a and b reference the same list object in memory, so a is b gives True. In contrast, a and c reference two separate list objects that contain the same values, so a is c gives False.
Official Python documentation on Comparisons:https://docs.python.org/3/reference/expressions.html#not-in
Official Python documentation on Identity comparisons:https://docs.python.org/3/reference/expressions.html#is
The is operator tests whether two variables refer to the same object in memory. If variables x and y refer to the same object, the expression x is y evaluates to True. Otherwise, it evaluates to False.
Question 8 Domain 1 Section 1: Advance Object-Oriented Programming
Which statement correctly describes type in the object-oriented programming sense?
In Python, type is the built-in metaclass that acts as the base class for all new-style classes. Every new-style class in Python, including built-in types such as int and str, is an instance of the type metaclass and derives from it.
What the Python Institute PCPP-32-101 Exam Covers
Exam domains verified against the Official Python Institute PCPP-32-101 exam guide, last checked November 2026.
Domain 1 Section 1: Advance Object-Oriented Programming
25%Advanced concepts in class design, inheritance, polymorphism, and composition. Learn magic methods, decorators, static and class methods, abstract classes, attribute encapsulation, and object serialization with pickle and shelve modules.
Domain 2 Section 2: Coding Conventions, Best Practices, and Standardization
12%Python Enhancement Proposals including PEP 8 style guidelines, PEP 20 philosophy, and PEP 257 docstring conventions. Learn naming conventions, code layout, and using linters to ensure code quality.
Domain 3 Section 4: Network Programming
18%Socket programming, REST API clients, HTTP methods, and data transfer formats. Work with JSON and XML, understand status codes, and build simple REST clients using the requests module.
Sample question from this domain above Q3
Domain 4 Section 5: File Processing and Communication with a Program's Environment
15%Database operations with sqlite3, file format processing including CSV and XML, logging configuration, and INI file parsing with ConfigParser. Learn CRUD operations and transaction management.
PCPP-32-101 Exam FAQ
Common questions about the exam itself
What is the difficulty level of PCPP-32-101 compared to PCAP?
Is PCAP certification a hard requirement for PCPP-32-101?
How long does it typically take to prepare for PCPP-32-101?
Which exam domain is the hardest in PCPP-32-101 and how should I approach it?
What languages can I take the PCPP-32-101 exam in?
How is the PCPP-32-101 exam delivered and can I take it remotely?
What happens if I fail PCPP-32-101 and how much does a retake cost?
How long does the PCPP-32-101 certification stay valid?
What job role does PCPP-32-101 prepare me for?
What is the relationship between PCPP-32-101 and PCPP-32-201?
Other Python Institute Exams
Free practice questions for more Python Institute certification exams
