Practice your Certified Associate in Python Programming certification test with free PCAP-31-03 exam cram and take control of your certification preparation. At FreeExamCram, you can practice online for free using real PCAP-31-03 exam dumps, verified questions, and expert-designed free online practice tests. Moreover our Python Institute PCAP-31-03 exam cram backed by our confidence-boosting refund guarantee.
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.)
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)
Given the code below,
which of the expressions will evaluate to True?
1. class Top:
2. value = 3
3.
4. def say(self):
5. return self.value
6.
7.
8. class Middle(Top):
9. value = 2
10.
11.
12. class Bottom(Middle):
13. def say(self):
14. return -self.value
15.
16.
17. short = Bottom()
18. tall = Top()
19. average = Middle()
(Select two answers.)
How many stars will the following code print to the monitor?
1. i = 0
2. while i < i + 2:
3. i += 1
4. print('*')
5. else:
6. print('*')
Which module in Python supports regular expressions?
© Copyrights FreeExamCram 2026. All Rights Reserved
We use cookies to ensure that we give you the best experience on our website (FreeExamCram). If you continue without changing your settings, we'll assume that you are happy to receive all cookies on the FreeExamCram.