Weekend Special 70% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: Board70

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

Question # 14

How many lines does the following snippet output?

Options:

A.

three

B.

one

C.

two

D.

four

Buy Now
Question # 15

A class constructor (Select two answers)

Options:

A.

can return a value

B.

cannot be invoked directly from inside the class

C.

can be invoked directly from any of the subclasses

D.

can be invoked directly from any of the superclasses

Buy Now
Question # 16

What is the expected output of the following snippet?

Options:

A.

the code is erroneous

B.

3

C.

7

D.

15

Buy Now
Question # 17

How many elements will the list1 list contain after execution of the following snippet?

Options:

A.

two

B.

zero

C.

one

D.

three

Buy Now
Question # 18

Which line can be used instead of the comment to cause the snippet to produce the following expected output? (Select two answers)

Expected output:

1 2 3

Code:

Options:

A.

c, b, a = b, a, c

B.

c, b, a = a, c, b

C.

a, b, c = c, a, b

D.

a, b, c = a, b, c

Buy Now
Question # 19

What would you use instead of XXX if you want to check whether a certain ‘ key' exists in a dictionary called diet? (Select two answers)

II

if XXX:

print("Key exists")

Options:

A.

'key' in diet

B.

diet['key'] != None

C.

diet.exists('key')

D.

'key' in diet.keys()

Buy Now
Question # 20

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

Options:

A.

'in not' in 'not'

B.

'in' in 'Thames'

C.

't' . upper ( ) in 'Thames'

D.

'in' in 'in'

Buy Now
Question # 21

What is the expected behavior of the following code?

Options:

A.

it outputs 0

B.

it outputs 1

C.

it raises an exception

D.

it outputs 2

Buy Now
Question # 22

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

Options:

A.

121 + 1 != '!' + 2 * '2'

B.

'AbC' lower () < 'AB'

C.

'1' + '1' + '1' < '1' * 3'

D.

'3.14' != str(3.1415)

Buy Now
Question # 23

What is the expected output of the following code?

Options:

A.

2

B.

3

C.

4

D.

an exception is raised

Buy Now
Exam Code: PCAP-31-03
Exam Name: Certified Associate in Python Programming
Last Update: Feb 23, 2025
Questions: 145
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