Spring Sale Special Limited Time 70% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: buysanta

Exact2Pass Menu

Certified Associate in Python Programming

Last Update 6 hours ago Total Questions : 154

The Certified Associate in Python Programming content is now fully updated, with all current exam questions added 6 hours ago. Deciding to include PCAP-31-03 practice exam questions in your study plan goes far beyond basic test preparation.

You'll find that our PCAP-31-03 exam questions frequently feature detailed scenarios and practical problem-solving exercises that directly mirror industry challenges. Engaging with these PCAP-31-03 sample sets allows you to effectively manage your time and pace yourself, giving you the ability to finish any Certified Associate in Python Programming practice test comfortably within the allotted time.

Question # 21

Executing the following snippet

will cause the dct:

A.

to hold two keys named ‘pi’ linked to 3.14 and 3.1415 respectively

B.

to hold two key named ‘pi’ linked to 3.14 and 3.1415

C.

to hold one key named ‘pi’ linked to 3.1415

D.

to hold two keys named ‘pi’ linked to 3.1415

Question # 22

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

A.

Python strings are actually lists

B.

Python strings can be concatenated

C.

Python strings can be sliced like lists

D.

Python strings are mutable

Question # 23

You need data which can act as a simple telephone directory. You can obtain it with the following clauses (choose two relevant variants; assume that no other items have been created before)

A.

dir={ ' Mom ' :5551234567, ' Dad ' :5557654321 >

B.

dir={ ' Mom ' : ' 5551234567 ' , * Dad ' : ' 5557654321 ' }

C.

dir={Mom:5551234567, Dad:5557654321}

D.

dir={Mom: ' 5551234567 ' , Dad: ' 5557654321 ' }

Question # 24

Assuming that the following inheritance set is in force, which of the following classes are declared properly? (Select two answers)

A.

class Class_4 (D, A) : pass

B.

class Class_1(C,D): pass

C.

class Class_3(A,C): pass

D.

class Class_2(B,D): pass

Question # 25

What is the expected behavior of the following code?

A.

it outputs ' None '

B.

it outputs 3

C.

it raises an exception

D.

it outputs 0

Question # 26

Files with the suffix .pyc contain:

A.

Python 4 source code

B.

backups

C.

temporary data

D.

semi-compiled Python code

Question # 27

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

A.

2 2

B.

1 3

C.

1 2 3

D.

2 2 3

Question # 28

What is the expected behavior of the following code?

A.

It outputs 123

B.

it raises an exception

C.

it outputs 321

D.

it outputs 6

Question # 29

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)

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

Question # 30

Which of the equations are True? (Select two answers)

A.

chr (ord (x)) = = x

B.

ord (ord (x)) = = x

C.

chr (chr (x)) = = x

D.

ord (chr (x)) = = x

Go to page: