Summer Sale 65% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: exams65

ExamsBrite Dumps

PCPP1 – Certified Professional in Python Programming 1 Question and Answers

PCPP1 – Certified Professional in Python Programming 1

Last Update Jul 26, 2026
Total Questions : 69

We are offering FREE PCPP-32-101 Python Institute exam questions. All you do is to just go and sign up. Give your details, prepare PCPP-32-101 free exam questions and then go for complete pool of PCPP1 – Certified Professional in Python Programming 1 test questions that will help you more.

PCPP-32-101 pdf

PCPP-32-101 PDF

$36.75  $104.99
PCPP-32-101 Engine

PCPP-32-101 Testing Engine

$43.75  $124.99
PCPP-32-101 PDF + Engine

PCPP-32-101 PDF + Testing Engine

$57.75  $164.99
Questions 1

Select the true statements related to PEP 8 naming conventions. (Select two answers.)

Options:

A.  

Class names should use the mixedCase naming style.

B.  

Exception names should follow the function naming conventions.

C.  

Modules should have short names entirely in lower-case.

D.  

You should never use the characters “l” (lower-case letter “el”) and “O” (upper-case letter “oh”) as single character variable names.

Discussion 0
Questions 2

Look at the following code snippets and decide which ones follow PEP 8 recommendations for whitespaces in expressions and statements (Select two answers.)

A)

No whitespace immediately before the opening parenthesis that starts the list of arguments of a function call:

B)

A whitespace immediately before a comma, semicolon, and colon:

C)

No whitespace between a trailing comma and a following closing parenthesis:

D)

A whitespace immediately after the opening parenthesis that starts indexing or slicing:

Options:

A.  

Option A

B.  

Option B

C.  

Option C

D.  

Option D

Discussion 0
Questions 3

What is true about the invocation of the cget () method?

Options:

A.  

It can be used to read widget attributes.

B.  

It has the same effect as the config () method.

C.  

It can be used to set new values to widget attributes.

D.  

It can be replaced with a dictionary-like access manner.

Discussion 0
Questions 4

Select the correct statements about the csv module.

(Select two answers.)

Options:

A.  

The DictReader method always gets the header from the first line in the file.

B.  

A reader object maps each row to a list of strings.

C.  

It is possible to create a DictWriter object without specifying a header.

D.  

A DictReader object maps each row to a dict.

Discussion 0
Questions 5

What will be the content of the cars.xml file when you run the following code?

import xml.etree.ElementTree as ET

root = ET.Element('data')

car_1 = ET.SubElement(root, 'car', {'brand': 'Audi'})

car_2 = ET.SubElement(root, 'car', {'brand': 'Volkswagen'})

tree = ET.ElementTree(root)

tree.write('cars.xml', 'UTF-8', True)

Options:

A.  

< data > < car brand="Audi" / > < car brand="Volkswagen" / > < /data >

B.  

< ?xml version='1.0'? >

< data > < car brand="Audi" / > < car brand="Volkswagen" / > < /data >

C.  

< ?xml version='1.0' encoding='UTF-8'? >

< data > < car brand="Audi" / > < car brand="Volkswagen" / > < /data >

D.  

< ?xml? >

< data > < car brand="Audi" / > < car brand="Volkswagen" / > < /data >

Discussion 0
Questions 6

Select the true statements related to PEP 8 programming recommendations for code writing. (Select two answers:)

Options:

A.  

You should use the not ... is operator (e.g. if not spam is None:), rather than the is not operator (e.g. if spam is not None:), to increase readability.

B.  

You should make object type comparisons using the ismstanceQ method (e.g. if isinstance (obj, int) :) instead of comparing types directly (eg if type(obj) is type(i)).

C.  

You should write code in a way that favors the CPython implementation over PyPy, Cython. and Jython.

D.  

You should not write string literals that rely on significant trailing whitespaces as they may be visually indistinguishable, and certain editors may trim them

Discussion 0
Questions 7

Analyze the code and choose the best statement that describes it.

Options:

A.  

___ne___() is not a built-in special method

B.  

The code is erroneous

C.  

The code is responsible for the support of the negation operator e.g. a = - a.

D.  

The code is responsible for the support of the inequality operator i.e. i =

Discussion 0
Questions 8

Which of the following types cannot be pickled?

Options:

A.  

integers, floating-point numbers, complex numbers

B.  

function and class definitions

C.  

None, booleans

D.  

strings, bytes, bytearrays

Discussion 0
Questions 9

Which sentence about the ©property decorator is false?

Options:

A.  

The ©property decorator should be defined after the method that is responsible for setting an encapsulated attribute.

B.  

The @property decorator designates a method which is responsible for returning an attribute value

C.  

The ©property decorator marks the method whose name will be used as the name of the instance attribute

D.  

The ©property decorator should be defined before the methods that are responsible for setting and deleting an encapsulated attribute

Discussion 0
Questions 10

Which of the following methods allow you to load a configuration using ConfigParser? (Select two answers.)

Options:

A.  

read

B.  

read_dict

C.  

read_conf

D.  

read_str

Discussion 0
Questions 11

Select the true statements about the following invocation:

(Select two answers.)

Options:

A.  

It addresses a service deployed at localhost (the host where the code is run).

B.  

It addresses a service whose timeout is set to 3000 ms.

C.  

It addresses a service located at the following address local.host.com.

D.  

It addresses a service listening at port 3000.

Discussion 0
Questions 12

What is a___traceback___?

(Select two answers )

Options:

A.  

An attribute owned by every exception object

B.  

A special method delivered by the traceback module to retrieve a full list of strings describing the traceback

C.  

An attribute that is added to every object when the traceback module is imported

D.  

An attribute that holds interesting information that is particularly useful when the programmer wants to store exception details in other objects

Discussion 0
Questions 13

Which of the following values can be returned by the messagebox. askquestion () method?

Options:

A.  

"accept:" and "cancel''

B.  

l and o

C.  

"yes" and "no"

D.  

True and False

Discussion 0
Questions 14

Select the true statements related to PEP 8 naming conventions. (Select two answers.)

Options:

A.  

Function and variable names should be lower-case with words separated by underscores.

B.  

You should always use self as the first argument to instance methods, and cls as the first argument to class methods.

C.  

Modules should have short names written in CameICase.

D.  

Constants should be written in all lower-case letters with words separated by underscores

Discussion 0
Questions 15

Select the true statements about sockets. (Select two answers)

Options:

A.  

A socket is a connection point that enables a two-way communication between programs running in a network.

B.  

A socket is always the secure means by which computers on a network can safely communicate, without the risk of exposure to an attack

C.  

A socket is a connection point that enables a one-way communication only between remote processes

D.  

A socket can be used to establish a communication endpoint for processes running on the same or different machines.

Discussion 0
Questions 16

Look at the following examples of comments and docstrings in Python Select the ones that are useful and compliant with PEP 8 recommendations (Select the two best answers.)

A)

B)

C)

D)

Options:

A.  

Option A

B.  

Option B

C.  

Option C

D.  

Option D

Discussion 0
Questions 17

Analyze the following snippet and select the statement that best describes it.

Options:

A.  

The code is syntactically correct despite the fact that the names of the function parameters do not follow the naming convention

B.  

The *arg parameter holds a list of unnamed parameters

C.  

The code is missing a placeholder for unnamed parameters.

D.  

The code is syntactically incorrect - the function should be defined as def f1 (*args, **kwargs) :

Discussion 0
Questions 18

Which one of the following methods allows you to debug an XML tree in the xml.etree ELementTree module?

Options:

A.  

debug

B.  

dump

C.  

log

D.  

parse

Discussion 0
Questions 19

What will happen if the mam window is too small to fit all its widgets?

Options:

A.  

Some widgets may be invisible

B.  

The window will be expanded.

C.  

An exception will be raised.

D.  

The widgets will be scaled down to fit the window's size.

Discussion 0
Questions 20

Which of the following statements related to :memory: are true?

(Select two answers.)

Options:

A.  

:memory: is a special name for loading a database from a file to the RAM.

B.  

You can use :memory: to delete a specific database that resides in the RAM.

C.  

You can use :memory: to establish a database connection.

D.  

:memory: is a special name for creating a temporary database in the RAM.

Discussion 0