New Year 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 # 34

A Python module named pymod.py contains a variable named pyvar.

Which of the following snippets will let you access the variable? (Select two answers)

Options:

A.

import pyvar from pymod pyvar = 1

B.

from pymod import pyvar = 1

C.

from pymod import pyvar pyvar ()

D.

import pymod pymod.pyvar = 1

Buy Now
Question # 35

Is it possible to safely check if a class/object has a certain attribute?

Options:

A.

yes, by using the hasattr attribute

B.

yes, by using the hasattr ( ) method

C.

yes, by using the hassattr ( ) function

D.

no, it is not possible

Buy Now
Question # 36

What is the expected output of the following code if there is no file named non existing_file inside the working directory?

Options:

A.

2 2

B.

1 3

C.

1 2 3

D.

2 2 3

Buy Now
Question # 37

Which of the following statements are true? (Select two answers)

Options:

A.

\e is an escape sequence used to mark the end of lines

B.

ASCII is synonymous with UTF-8

C.

II in ASCII stands for Information Interchange

D.

a code point is a number assigned to a given character

Buy Now
Question # 38

Which of the following literals reflect the value given as 34.23? (select two answers)

Options:

A.

.3423e2

B.

3423e-2

C.

.3423e-2

D.

3423e2

Buy Now
Question # 39

A Python module named pymod, py contains a function named pyfun ( ).

Which of the following snippets will let you invoke the function? (Select two answers)

Options:

A.

From pymod import ‘

Pymod.pyfun ( )

B.

Import pymod

Pymod. Pyfun ( )

C.

Import pyfun from pymod

Pyfun ( )

D.

From pymod import pyfun

Pyfun ( )

Buy Now
Question # 40

What is true about the __based__attribute in Python?

Options:

A.

It is accessible inside a class and an object.

B.

There is no such property.

C.

it is accessible inside an object

D.

It is accessible inside a class

Buy Now
Question # 41

What is the expected behavior of the following code?

Options:

A.

it outputs 6

B.

it outputs 1

C.

it outputs 3

D.

it raises an exception

Buy Now
Question # 42

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

Options:

A.

11 == '011'

B.

3 * 'a' < 'a' * 2

C.

'abc' .upper () < 'abc'

D.

'1' + '2' * 2 !=2 '12'

Buy Now
Question # 43

Which of the following statements are true? {Select two answers)

Options:

A.

an escape sequence can be recognized by the / sign put in front of it

B.

II in ASCII stands for Internal Information

C.

ASCII is a subset of UNICODE

D.

a code point is a number assigned to a given character

Buy Now
Exam Code: PCAP-31-03
Exam Name: Certified Associate in Python Programming
Last Update: Dec 18, 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