Summer Certification Limited Time 70% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: cramtick70

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

Questions 4

Select the true statement about PEP 8 recommendations related to line breaks and binary operators.

Options:

A.

It is recommended that you use line breaks before binary operators to improve code readability.

B.

It is permissible to use line breaks before or after a binary operator as long as the convention is consistent locally However, for new code it is recommended that break lines should be used only after binary operators.

C.

It is recommended that you use line breaks after binary operators to improve code readability.

D.

There is no specific PEP 8 recommendation related to using line breaks with binary operators.

Buy Now
Questions 5

Analyze the following snippet and decide whether the code is correct and/or which method should be distinguished as a class method.

Options:

A.

There is only one initializer, so there is no need for a class method.

B.

The getNumberofCrosswords () method should be decorated With @classmethod.

C.

The code is erroneous.

D.

The gexNumberOfcrosswords () and issrived methods should be decorated with @classzoechod.

Buy Now
Questions 6

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 7

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.)

Options:

A.

def net_expense(q, price):

"""Return the total cost of items before tax."""

return q * price

B.

n = n - 1 # Decrement n by 1.

C.

val = val + 1.15 # Compensate for diminished value.

D.

def total_cost(q):

'''Takes the q argument and multiplies it by 1.15.'''

return q * 1.15

Buy Now
Questions 8

To get an answer (True or False) to the question of whether two objects hold the same values, you should use:

Options:

A.

The id() function

B.

The isinstance() function

C.

The == operator

D.

The is operator

Buy Now
Questions 9

Select the true statements about the connection-oriented and connectionless types of communication. (Select two answers.)

Options:

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

B.

Connectionless communications are usually built on top of TCP

C.

Using walkie-talkies is an example of a connection-oriented communication

D.

A phone call is an example of a connection-oriented communication

Buy Now
Questions 10

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 =

Buy Now
Questions 11

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 12

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

Options:

A.

The code is an example of implicitly chained exceptions.

B.

The code is erroneous as the OwnMath class does not inherit from any Exception type class

C.

The code is fine and the script execution is not interrupted by any exception.

D.

The code is an example of explicitly chained exceptions.

Buy Now
Questions 13

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 14

What is true about the following snippet of code?

class Cat:

def __init__(self, weight, sex):

self.height = height

self.weight = weight

self.sex = sex

def say(self):

print('meows')

kitty = Cat(1, 'male')

kitty.say()

Options:

A.

The snippet will print: 1 male.

B.

The snippet will cause a NameError exception.

C.

The snippet will print: meows.

D.

The snippet will cause a ValueError exception.

Buy Now
Questions 15

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 16

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 17

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.

Buy Now
Questions 18

What is the result of the following code?

import configparser

config = configparser.ConfigParser()

config['DEFAULT'] = {}

config['mysql'] = {}

config['postgresql'] = {}

config['redis'] = config['postgresql']

print(config.sections())

Options:

A.

['DEFAULT', 'mysql', 'postgresql', 'redis']

B.

['mysql', 'postgresql', 'redis']

C.

['DEFAULT', 'mysql', 'postgresql', 'postgresql']

D.

['mysql', 'postgresql', 'postgresql']

Buy Now
Questions 19

Which of the following will set the button text's font to 12 point italics Anal? (Select two answers)

A)

B)

C)

D)

Options:

A.

Option A

B.

Option B

C.

Option C

D.

Option D

Buy Now
Questions 20

Select the true statement about the___name___attribute.

Options:

A.

___name___is a special attribute, which is inherent for both classes and instances, and it contains information about the class to

which a class instance belongs.

B.

___name is a special attribute, which is inherent for both classes and instances, and it contains a dictionary of object attributes.

C.

__name___is a special attribute, which is inherent for classes and it contains information about the class to which a class instance

belongs.

D.

__name___is a special attribute, which is inherent for classes, and it contains the name of a class.

Buy Now

PCPP1 |

Exam Code: PCPP-32-101
Exam Name: PCPP1 – Certified Professional in Python Programming 1
Last Update: Jul 7, 2026
Questions: 45
PCPP-32-101 pdf

PCPP-32-101 PDF

$25.5  $84.99
PCPP-32-101 Engine

PCPP-32-101 Testing Engine

$30  $99.99
PCPP-32-101 PDF + Engine

PCPP-32-101 PDF + Testing Engine

$40.5  $134.99