Summer Special 60% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: bestdeal

Free Python Institute PCAP-31-03 Practice Exam with Questions & Answers | Set: 2

Questions 11

The first parameter of each method:

Options:
A.

holds a reference to the currently processed object

B.

is always set to None

C.

is set to a unique random value

D.

is set by the first argument's value

Python Institute PCAP-31-03 Premium Access
Questions 12

What is the expected behavior of the following code?

PCAP-31-03 Question 12

It will:

Options:
A.

print 0

B.

cause a runtime exception

C.

prints 3

D.

print an empty line

Questions 13

With regards to the directory structure below, select the proper forms of the directives in order to import module_c. (Select two answers)

PCAP-31-03 Question 13

Options:
A.

from pypack.upper.lower import module_c

B.

import pypack.upper.lower.module_c

C.

import upper.module_c

D.

import upper.lower.module_c

Questions 14

What is the expected behavior of the following code?

PCAP-31-03 Question 14

Options:
A.

it raises an exception

B.

it outputs True

C.

it outputs False

D.

it outputs nothing

Questions 15

Assuming that the following piece of code has been executed successfully, which of the expressions evaluate to True? (Select two answers)

PCAP-31-03 Question 15

Options:
A.

obj_b.prop_a == 3

B.

hasattr(obj_b, 'prop_aa')

C.

isinstance(obj_c,A)

D.

B. VarA == 3

Questions 16

The following class hierarchy is given. What is the expected output of the code?

PCAP-31-03 Question 16

Options:
A.

BB

B.

CC

C.

AA

D.

BC

Questions 17

A two-parameter lambda function raising its first parameter to the power of the second parameter should be declared as:

Options:
A.

lambda (x, y) = x ** y

B.

lambda (x, y): x ** y

C.

def lambda (x, y): return x ** y

D.

lambda x, y: x ** y

Questions 18

What is the expected behavior of the following code?

PCAP-31-03 Question 18

Options:
A.

the code is erroneous and it will not execute

B.

it outputs 'tuple' object does not support item assignment

C.

0it outputs list assignment index out of range

D.

it outputs None

Questions 19

A method for passing the arguments used by the following snippet is called:

PCAP-31-03 Question 19

Options:
A.

sequential

B.

named

C.

positional

D.

keyword

Questions 20

What is the expected behavior of the following code?

PCAP-31-03 Question 20

Options:
A.

it outputs 2

B.

the code is erroneous and it will not execute

C.

it outputs 1

D.

it outputs 3

Exam Code: PCAP-31-03
Certification Provider: Python Institute
Exam Name: Certified Associate in Python Programming
Last Update: Jul 15, 2025
Questions: 147

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.