Official Bank 0/147

Certified Associate in Python Programming (PCAP-31) - Python Actual Exam Questions

Last updated on March 10, 2026

97% Exam Compliance
147 Total Questions
1
Question

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

Discussion (0 comments)

to join the discussion

Community Discussion

No discussions yet. Be the first to ask!

2
Question

A file name like this one below says mat: (select three answers) services. cpython-36.pyc

Select 3
Options
A

the interpreter used to generate the file is version 3.6

B

it has been produced by CPython

C

it is the 36th version of the file

D

the file comes from the services . py source file

Discussion (0 comments)

to join the discussion

Community Discussion

No discussions yet. Be the first to ask!

3
Question

What is the expected behavior of the following code?

Question image
Options
A

it outputs False

B

it outputs True

C

it raises an exception

D

it outputs nothing

Discussion (0 comments)

to join the discussion

Community Discussion

No discussions yet. Be the first to ask!

4
Question

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

Select 2
Options
A

rfind("python","r")

B

sorted("python")

C

"python".sort ()

D

"python".index("th")

Discussion (0 comments)

to join the discussion

Community Discussion

No discussions yet. Be the first to ask!

5
Question

Assuming that the snippet below has been executed successfully, which of the following expressions will evaluate to True? (Select two answers) string = 'python' [::2] string = string[-1] + string[-2]

Select 2
Options
A

string[0] == string[-1]

B

string is None

C

len (string] == 3

D

string[0] == 'o'

Discussion (0 comments)

to join the discussion

Community Discussion

No discussions yet. Be the first to ask!

Finish Practice?

Are you sure you want to finish? This will end your practice session.