Exam Details

  • Exam Code
    :PCAP-31-03
  • Exam Name
    :PCAP - Certified Associate in Python Programming
  • Certification
    :Python Institute Certifications
  • Vendor
    :Python Institute
  • Total Questions
    :153 Q&As
  • Last Updated
    :May 08, 2025

Python Institute Python Institute Certifications PCAP-31-03 Questions & Answers

  • Question 21:

    What is the expected behavior of the following snippet?

    It will:

    A. cause a runtime exception

    B. print 1

    C. print 0 , [1]

    D. print [1J

  • Question 22:

    What is the expected output of the following code if there is no file named non existing_file inside the working directory?

    A. 2 2

    B. 1 3

    C. 1 2 3

    D. 2 2 3

  • Question 23:

    What is the expected behavior of the following code?

    x - 3 % 1

    y -1 if x > else 0

    print (y)

    A. it outputs -1

    B. the code is erroneous and it will not execute

    C. it outputs 1

    D. it outputs 0

  • Question 24:

    What is the expected behavior of the following snippet?

    It will:

    A. cause a runtime exception on line 02

    B. cause a runtime exception on line 01

    C. cause a runtime exception on line 03

    D. print3

  • Question 25:

    What is the expected output of the following code?

    A. 21

    B. 2

    C. 3

    D. 12

  • Question 26:

    A class constructor (Select two answers)

    A. can return a value

    B. cannot be invoked directly from inside the class

    C. can be invoked directly from any of the subclasses

    D. can be invoked directly from any of the superclasses

  • Question 27:

    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?

    A. print (get(self))

    B. print (self.get())

    C. print (get())

    D. print (self.get (val))

  • Question 28:

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

    A. isinstance (obj_b,A)

    B. A.VarA == 1

    C. obj_a is obj_aa

    D. B.VarA == 1

  • Question 29:

    What can you deduce from the following statement? (Select two answers) str = open('file.txt', "rt")

    A. str is a string read in from the file named file.txt

    B. a newlina character translation will be performed during the reads

    C. if file. txt does not exist, it will be created

    D. the opened file cannot be written with the use of the str variable

  • Question 30:

    You are going to read just one character from a stream called s. Which statement would you use?

    A. ch = read(s, 1)

    B. ch = s. input(1)

    C. ch = input(s, 1)

    D. ch = s. read(l)

Tips on How to Prepare for the Exams

Nowadays, the certification exams become more and more important and required by more and more enterprises when applying for a job. But how to prepare for the exam effectively? How to prepare for the exam in a short time with less efforts? How to get a ideal result and how to find the most reliable resources? Here on Vcedump.com, you will find all the answers. Vcedump.com provide not only Python Institute exam questions, answers and explanations but also complete assistance on your exam preparation and certification application. If you are confused on your PCAP-31-03 exam preparations and Python Institute certification application, do not hesitate to visit our Vcedump.com to find your solutions here.