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

Free Python Institute PCPP-32-101 Practice Exam with Questions & Answers | Set: 2

Questions 11

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:

PCPP-32-101 Question 11

B)

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

PCPP-32-101 Question 11

C)

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

PCPP-32-101 Question 11

D)

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

PCPP-32-101 Question 11

Options:
A.

Option A

B.

Option B

C.

Option C

D.

Option D

Python Institute PCPP-32-101 Premium Access
Questions 12

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 12

B)

PCPP-32-101 Question 12

C)

PCPP-32-101 Question 12

D)

PCPP-32-101 Question 12

Options:
A.

Option A

B.

Option B

C.

Option C

D.

Option D

Questions 13

Select the true statements about the sqlite3 module. (Select two answers.)

Options:
A.

The fetchalt method returns None when no rows are available

B.

The execute method allows you to perform several queries at once

C.

The execute method is provided by the Cursor class

D.

The fetchone method returns None when no rows are available

Questions 14

A socket object is usually created by which one of the following invocations?

Options:
A.

socket. socket (socket_domain, socket_type)

B.

socket = socket. socket (socket_number)

C.

socket = socket. socket (socket_domain, socket_type, server_address)

D.

socket = socket.socket(server address)

Questions 15

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

Questions 16

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

Options:
A.

my_dict = {

"X": "180.A",

"Y": "206.P",

"Z": "12.C"

}

B.

spam = my_function(arg_one,

arg_two,

arg_three,

arg_four)

C.

foo = my_function

(arg_one, arg_two,

arg_three, arg_four

)

D.

my_dict = { "A" : "1", "B" : "2", "C" : "1" }

Questions 17

Select the true statements about the following invocation:

PCPP-32-101 Question 17

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

Questions 18

Select the true statements about the sqirte3 module. (Select two answers.)

Options:
A.

The sqlite3 module provides an interface compliant with the DB-API 2.0.

B.

The special name memory is used to create a database in RAM.

C.

The sqhte3 module does not support transactions.

D.

The fetchall method returns an empty list when no rows are available

Questions 19

What is true about a parameter named cls?

Options:
A.

It is usually used as a reference to a class instance.

B.

It is usually used as the first parameter of a static method.

C.

It is usually used as the first parameter of a class method.

D.

It is the name of a module that delivers an abstract method decorator.

Questions 20

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.

Exam Code: PCPP-32-101
Certification Provider: Python Institute
Exam Name: PCPP1 – Certified Professional in Python Programming 1
Last Update: Aug 21, 2026
Questions: 69
PDF + Testing Engine
$164.99
$49.5
Testing Engine
$124.99
$37.5
PDF (Q&A)
$104.99
$31.5

Python Institute Free Exams

Python Institute Free Exams
Examstrack offers free Python Institute exam materials and practice tests to aid your Python Institute certification journey.