Summer Certification Sale 70% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: best70

PCPP-32-101 PCPP1 – Certified Professional in Python Programming 1 Questions and Answers

Questions 4

What is ElementTree?

Options:

A.

A Python built-in module that contains functions used for creating HTML files.

B.

A Python library that contains an API used for parsing and manipulating JSON files.

C.

A Python library that contains functions and tools used for manipulating text files in GUI Programming.

D.

A Python built-in module that contains functions used for parsing and creating XML data.

Buy Now
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 >

Buy Now
Questions 6

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

class Sword:

var1 = 'weapon'

def __init__(self):

self.name = 'Excalibur'

s1 = Sword()

Options:

A.

The snippet will cause an AttributeError exception.

B.

The snippet will cause a ValueError exception.

C.

The class variable value can be updated with the following code: cls.var1

D.

The class variable value can be updated with the following code: Sword.var1

Buy Now
Questions 7

What is true about the unbind () method? (Select two answers.)

Options:

A.

It is invoked from within the events object

B.

It is invoked from within a widget's object

C.

It needs a widget's object as an argument

D.

It needs the event name as an argument

Buy Now
Questions 8

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

Buy Now
Questions 9

Select the true statements related to PEP 257. (Select two answers.)

Options:

A.

The closing quotes of a one-line docstring should be put on a separate line.

B.

A docstring is a string literal that occurs anywhere in Python code, and is used to document Python functions, classes, and public methods.

C.

A docstring is a string literal that occurs as the first statement in a Python module, function, class, or method, and is used to document them.

D.

There are two types of docstrings in Python: one-line and multi-line docstrings.

Buy Now
Questions 10

In the JSON processing context, the term serialization:

Options:

A.

names a process in which Python data is turned into a JSON string.

B.

names a process in which a JSON string is turned into Python data.

C.

refers to nothing, because there is no such thing as JSON serialization.

D.

names a process in which a JSON string is remodeled and transformed into a new JSON string

Buy Now
Questions 11

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.

Buy Now
Questions 12

Select the true statement about the socket. gaierror exception.

Options:

A.

It is raised when a timeout occurs on a socket.

B.

It is raised when a system function returns a system-related error.

C.

It is raised when an address-related error caused by the repr () function occurs.

D.

It is raised when an address-related error caused by the getaddrinfo () and getnameinfo () functions occurs.

Buy Now
Questions 13

Select the true statements about the json.loads() function.

(Select two answers.)

Options:

A.

It takes Python data as its argument.

B.

It returns a JSON string.

C.

It takes a JSON string as its argument.

D.

It returns a Python entity.

Buy Now
Questions 14

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.

Buy Now
Questions 15

The following JSON string:

{ 1 }

Options:

A.

is erroneous

B.

is an object

C.

is an array

D.

is an integer

Buy Now
Questions 16

Which of the following examples using line breaks and different indentation methods are compliant with PEP 8 recommendations? (Select two answers.)

A)

PCPP-32-101 Question 16

B)

PCPP-32-101 Question 16

C)

PCPP-32-101 Question 16

D)

PCPP-32-101 Question 16

Options:

A.

Option A

B.

Option B

C.

Option C

D.

Option D

Buy Now
Questions 17

Select a log that matches the following format:

'%(name)s[%(levelname)s][%(asctime)s] :%(message)s'

Options:

A.

root[CRITICAL][2019-10-19 18:21:35] :Invalid argument

B.

root:CRITICAL:2019-10-19 18:21:35,407:Invalid argument

C.

root[CRITICAL][2019-10-19 18:21:35,407] :Invalid argument

D.

root:CRITICAL:2019-10-19 18:21:35:Invalid argument

Buy Now
Questions 18

Which methods can be invoked in order to draw a triangle?

(Select two answers.)

Options:

A.

create_shape()

B.

create_line()

C.

create_triangle_shape()

D.

create_polygon()

Buy Now
Questions 19

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

Buy Now
Questions 20

What is true about the constructor’s argument, which sets the button’s title to a desired string?

Options:

A.

It is the second argument of the constructor.

B.

It is the third argument of the constructor.

C.

It is a keyword argument named title.

D.

It is a keyword argument named text.

Buy Now
Exam Code: PCPP-32-101
Exam Name: PCPP1 – Certified Professional in Python Programming 1
Last Update: Aug 24, 2026
Questions: 69

PDF + Testing Engine

$134.99

Testing Engine

$99.99

PDF (Q&A)

$84.99