Exam Code: PCAP-31-03
Exam Questions: 704
Certified Associate in Python Programming
Updated: 26 Nov, 2026
Viewing Page : 1 - 71
Practicing : 1 - 5 of 704 Questions
Question 1

What can you do to indicate that a module entity should be treated as private?

Choose two.

Options :
Answer: A,D

Question 2

What is the expected output of the following code?

1. class Test:

2.     def __init__(self, s='Welcome'):

3.         self.s = s

4.  

5.     def print(self):

6.         print(self.s)

7.  

8.  

9. x = Test()

10. x.print()

Options :
Answer: B

Question 3

Which of the following messages will appear on the screen when the code is run?

1. class Failure(Exception):

2.     def __init__(self, message):

3.         self.message = message

4.  

5.     def __str__(self):

6.         return "out of order"

7.  

8.  

9. try:

10.     print("turn on")

11.     raise Failure("crash")

12. except Failure as problem:

13.     print(problem)

14. else:

15.     print("success")

(Select two answers.)

Options :
Answer: C,D

Question 4

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

Options :
Answer: C,D

Question 5

Consider the following code.

1. x = 42

2. y = 7

3. data = "I'm gonna make him an offer he can't refuse."

Which of the following expressions will evaluate to 19?

Options :
Answer: A

Viewing Page : 1 - 71
Practicing : 1 - 5 of 704 Questions

© Copyrights FreePDFQuestions 2026. All Rights Reserved

We use cookies to ensure that we give you the best experience on our website (FreePDFQuestions). If you continue without changing your settings, we'll assume that you are happy to receive all cookies on the FreePDFQuestions.