Big Halloween Sale 70% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: Board70

PCAP-31-03 Exam Dumps - Python Institute PCAP Questions and Answers

Question # 4

Which of the following expressions evaluate to True? (Select two answers)

Options:

A.

' t '.upper () in 'Thames'

B.

'in not' in 'not'

C.

'not' not in 'in'

D.

'a' not in 'ABC' .lower ()

Buy Now
Question # 5

The following class definition is given. We want the show () method to invoke the get () method, and then output the value the get () method returns. Which of the invocations should be used instead of XXX?

Options:

A.

print (get(self))

B.

print (self.get())

C.

print (get())

D.

print (self.get (val))

Buy Now
Question # 6

Which of the following expressions evaluate to True? (Select two answers)

Options:

A.

str(1-1) in '012345£739'[:2]

B.

'phd' in 'alpha'

C.

'deb' not in 'abcde' [::-1]

D.

'True' not in 'False'

Buy Now
Question # 7

What is true about Python class constructors? (Select two answers)

Options:

A.

the constructor's first parameter identifies an object currently being created

B.

the constructor cannot use the default values of the parameters

C.

the constructor can be invoked directly under strictly defined circumstances

D.

super-class constructor is invoked implicitly during constructor execution

Buy Now
Question # 8

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

Options:

A.

a is b

B.

b( ) > 2

C.

a() > 2

D.

a is not None

Buy Now
Question # 9

What can you deduce from the following statement? (Select two answers)

str = open('file.txt', "rt")

Options:

A.

str is a string read in from the file named file.txt

B.

a newlina character translation will be performed during the reads

C.

if file. txt does not exist, it will be created

D.

the opened file cannot be written with the use of the str variable

Buy Now
Question # 10

What is the expected behavior of the following code?

Options:

A.

it outputs [1, 3]

B.

the code is erroneous and it will not execute

C.

it outputs [3, 1]

D.

it outputs [4, 2, 0]

Buy Now
Question # 11

Which of the following invocations are valid? (Select two answers)

Options:

A.

sorted ("python'')

B.

"python" .sort ( )

C.

sort" ("python")

D.

"python' ,find (" ")

Buy Now
Question # 12

What is true about Object-Oriented Programming in Python? (Select two answers)

Options:

A.

encapsulation allows you to protect some data from uncontrolled access

B.

the arrows on a class diagram are always directed from a superclass towards its subclass

C.

inheritance is the relation between a superclass and a subclass

D.

an object is a recipe for a class

Buy Now
Question # 13

What is the expected out of the following code of the file named zero_length_existing_file is a zero-length file located inside the working directory?

Options:

A.

0

B.

-1

C.

an errno value corresponding to file not found

D.

2

Buy Now
Exam Code: PCAP-31-03
Exam Name: Certified Associate in Python Programming
Last Update: Nov 3, 2025
Questions: 154
PCAP-31-03 pdf

PCAP-31-03 PDF

$25.5  $84.99
PCAP-31-03 Engine

PCAP-31-03 Testing Engine

$28.5  $94.99
PCAP-31-03 PDF + Engine

PCAP-31-03 PDF + Testing Engine

$40.5  $134.99