Free PCPP1 Mock Exam – Practice Online Confidently

Increase your chances of passing the Python Institute PCPP1 exam questions on your first try. Practice with our free online PCPP1 exam mock test designed to help you prepare effectively and confidently.

Exam Code: PCPP1
Exam Questions: 564
Certified Professional in Python Programming 1
Updated: 26 Aug, 2026
Question 1

Suppose you have the following code:
class ClientList(list):
    def search_email(self, value):
        result = [client for client in self if value in client.email]
        return result
 
class Client:
    all_clients = ClientList()
 
    def __init__(self, name, email):
        self.name = name
        self.email = email
        Client.all_clients.append(self)
Select all true statements. (select 2)

Options :
Answer: B,C

Question 2

Consider the following Python code snippet:

class Meta(type):

    def __new__(cls, name, bases, attrs):

        attrs['add'] = lambda self, value: self.append(value)

        return super().__new__(cls, name, bases, attrs)

 

 

class CustomList(list, metaclass=Meta):

    pass

What does the CustomList class do in this code?

Options :
Answer: D

Question 3

In the context of the SQLite database, which of the following commands is correct for updating a record in a table named Students, given that we want to change the Grade of the student with ID 123 to 'A'?

Options :
Answer: D

Question 4

What is the result of the following code?
class Book:
    language = 'ENG'
    is_ebook = True
 
    def set_title(self, value):
        if not isinstance(value, str):
            raise TypeError(
                'The value of the title attribute must be of str '
                'type.'
            )
        self.title = value
 
 
book = Book()
book.set_title('Inferno')
book.year = 2020
book.subtitle = None
print(book.__dict__)

Options :
Answer: A

Question 5

You are building a Python application that needs to send an HTTP POST request with JSON data to a remote server. Which code snippet correctly demonstrates the usage of the requests module to accomplish this task?

Options :
Answer: D

Viewing Page : 1 - 57
Practicing : 1 - 5 of 564 Questions

© Copyrights FreeMockExams 2026. All Rights Reserved

We use cookies to ensure that we give you the best experience on our website (FreeMockExams). If you continue without changing your settings, we'll assume that you are happy to receive all cookies on the FreeMockExams.