×

Special Offer! Black Friday + Cyber Monday Sale! Extra 20% OFF - Ends In Coupon code: HELLO20OFF

Free PCAP-31-03 Mock Exam – Practice Online Confidently

Increase your chances of passing the Python Institute PCAP-31-03 exam questions on your first try. Practice with our free online PCAP-31-03 exam mock test designed to help you prepare effectively and confidently.

Exam Code: PCAP-31-03
Exam Questions: 704
Certified Associate in Python Programming
Updated: 24 Nov, 2025
Question 1

Which of the following lines of code will work flawlessly when put independently inside the add_new () method in order to make the snippet's output equal to [0, 1, 21 ? (Select two answers)

Capture

Options :
Answer: D

Question 2

What is the expected output of the following code?

1. def func(x, y=2):

2.     num = 1

3.     for i in range(y):

4.         num = num * x

5.     return num

6.  

7.  

8. print(func(4))

9. print(func(4, 4))

Options :
Answer: A

Question 3

What is the expected output of the following code?

1. class A:

2.     def __init__(self, x=2, y=3):

3.         self.x = x

4.         self.y = y

5.  

6.     def __str__(self):

7.         return 'A'

8.  

9.     def __eq__(self, other):

10.         return self.x * self.y == other.x * other.y

11.  

12.  

13. a = A(1, 2)

14. b = A(2, 1)

15. print(a == b)

Options :
Answer: A

Question 4

Which of the following statements

would create an instance of the Computer class correctly?

1. class Computer:

2.     def __init__(self, ram):

3.         self.ram = ram

4.         self.type = 'server'

Options :
Answer: B

Question 5

Assuming that the following piece of code has been executed successfully, which of the expressions evaluate to True? (Choose two.)

1

Options :
Answer: A,C

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

© Copyrights FreeMockExams 2025. All Rights Reserved

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