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
What will the value of the i variable be when the following loop finishes its execution?

Exhibit
Options
A 10
B the variable becomes unavailable
C 11
D 9
Discussion (0 comments)

to join the discussion

Community Discussion

No discussions yet. Be the first to ask!

2
Question
Which of the following expressions evaluate to True? (Select two answers)
Select 2
Options
A 121 +1 == int ('1' + 2 * '2')
B float ('3.14') == str('3.'+'14')
C '8' + '8' !=2 * '8'
D 'xyz'.lower() 'XY'
Discussion (0 comments)

to join the discussion

Community Discussion

No discussions yet. Be the first to ask!

3
Question
With regards to the directory structure below, select the proper forms of the directives in order to

Exhibit

import module_
Options
A import pypack.module_a
B import module_a from pypack
C from pypack import module_a
D import module_a
Discussion (0 comments)

to join the discussion

Community Discussion

No discussions yet. Be the first to ask!

4
Question
Which of the following statement are true? (Select two answers)
Select 2
Options
A closing an open file is performed by the closefile ( ) function
B the second open ( ) argument describes the open mode and defaults to ‘w’
C if open ( ) ‘s second argument is ‘r’ the file must exist or open will fail
D if open ( )’s second argument is ‘w’ and the invocation succeeds, the previous file’s content is lost
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.