Official Bank 0/147

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

Last updated on June 20, 2026

97% Exam Compliance
147 Total Questions
1
Question
Assuming that String is six or more letters long, the following slice String[1:-2] is shorter than the original string by:
Options
A four chars
B three chars
C one char
D two chars
Discussion (0 comments)

to join the discussion

Community Discussion

No discussions yet. Be the first to ask!

2
Question
The simplest possible class definition in Python can be expressed as:
Options
A class X:
B class X:
pass
C class X: {}
D class X:
return
Discussion (0 comments)

to join the discussion

Community Discussion

No discussions yet. Be the first to ask!

3
Question
What is true about Python packages? (Select two answers)
Select 2
Options
A the__name__variable always contains the name of a package
B the pyc extension is used to mark semi-compiled Python packages
C a package is a group of related modules
D a package is a single file whose name ends with the pa extension
Discussion (0 comments)

to join the discussion

Community Discussion

No discussions yet. Be the first to ask!

4
Question
What is the expected output of the following snippet?

Exhibit
Options
A the code is erroneous
B 3
C 15
D 7
Discussion (0 comments)

to join the discussion

Community Discussion

No discussions yet. Be the first to ask!

5
Question
What is the expected behavior of the following code?

Exhibit
Options
A it outputs 2
B it outputs 3
C it outputs :
D the code is erroneous and it will not execute
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.