Updated PCAP-31-03 Exam Questions For Certified Associate in Python Programming Exam

If you want to pass your Certified Associate in Python Programming Exam, you can study the updated PCAP-31-03 Exam Questions for your best preparation, it covers 109 questions and answers for you to practice so that you can clear your PCAP-31-03 Certified Associate in Python Programming Exam easily. We highly recommend you choose PassQuestion PCAP-31-03 free questions first before taking your real PCAP-31-03 exam.

Test Online PCAP-31-03 Free Questions

1. Which of the listed actions can be applied to the following tuple? (Select two answers)

 
 
 
 

2. There is a stream named s open for writing.

What option will vou select to write a line to the stream”

 
 
 
 

3. What is the expected output of the following code if existing_file is the name of a file located inside the working directory?

 
 
 
 

4. Files with the suffix .pyc contain:

 
 
 
 

5. What is true about Python packages? (Select two answers)

 
 
 
 

6. Which of the following statements are true? (Select two answers)

 
 
 
 

7. What is the expected output of the following snippet?

 
 
 
 

8. Which of the following invocations are valid? (Select two answers)

 
 
 
 

9. Which of the following lambda definitions are correct? (Select two answers)

 
 
 
 

10. If you need a function that does nothing, what would you use instead of XXX? (Select two answers)

def idler ( ):

XXX

 
 
 
 

11. Which one of the platform module functions should be used to determine the underlying platform name?

 
 
 
 

12. A file name like this one below says mat: (select three answers)

services. cpython-36.pyc

 
 
 
 

13. What is the expected behavior of the following code?

 
 
 
 

14. Which of the following lambda function definitions are correct? (Select two answers)

 
 
 
 

15. Assuming that the snippet below has been executed successfully, which of the following expressions will evaluate to True? (Select two answers)

string = ‘python’ [::2]

string = string[-1] + string[-2]

 
 
 
 

16. The following class definition is given.

We want the show () method to invoke the get () method, and then output the value the get () method returns.

Which of the invocations should be used instead of XXX?

 
 
 
 

17. A property that stores information about a given class’s super-classes is named:

 
 
 
 

18. The simplest possible class definition in Python can be expressed as:

 
 
 
 

19. What is the expected out of the following code of the file named zero_length_existing_file is a zero-length file located inside the working directory?

 
 
 
 

20. What is the expected behavior of the following code?

 
 
 
 

21. Which of the following expression evaluate to True? (Select two answers)

 
 
 
 

22. Assuming that the code below has been executed successfully, which of the following expressions will always evaluate to True? (Select two answers)

import random

v1 = random. random()

v2 = random. random()

 
 
 
 

23. With regards to the directory structure below, select the proper forms of the directives in order to import module_a. (Select two answers)

 
 
 
 

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

 
 
 
 

25. Which of the following statements are true? (Select two answers)

 
 
 
 

26. Which line can be used instead of the comment to cause the snippet to produce the following expected output? (Select two answers)

Expected output:

1 2 3

Code:

 
 
 
 

27. How many elements will the list1 list contain after execution of the following snippet?

 
 
 
 

28. The following class hierarchy is given.

What is the expected output of the code?

 
 
 
 

29. Assuming that the following snippet has been successfully executed, which of the equations are True? (Select two answers)

 
 
 
 

30. A method for passing the arguments used by the following snippet is called:

 
 
 
 

31. What is the expected output of the following snippet?

 
 
 
 

32. Assuming that the code below has been placed inside a file named code.py and executed successfully, which of the following expressions evaluate to True? (Select two answers)

 
 
 
 
 
 

33. How many lines does the following snippet output?

 
 
 
 

34. You are going to read 16 bytes from a binary file into a bytearray called data.

Which lines would you use? (Select two answers)

 
 
 
 

35. Assuming that the following inheritance set is in force, which of the following classes are declared properly? (Select two answers)

 
 
 
 

36. 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, 1]? (Select two answers)

 
 
 
 

37. What is the expected behavior of the following code?

 
 
 
 

38. What is true about Python packages? (Select two answers)

 
 
 
 

39. What will the value of the i variable be when the following loop finishes its execution?

 
 
 
 

40. Which of the following literals reflect the value given as 3 4. 2 3 (select two answers)

 
 
 
 

Question 1 of 40

PCAP-31-02 Practice Test Questions - Certified Associate in Python Programming

Leave a Reply

Your email address will not be published. Required fields are marked *