PCAP-31-03 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
    :Jul 11, 2026

Python Institute PCAP-31-03 Online Questions & Answers

  • Question 21:

    Which of the following statement are true? (Select two answers)

    A. closing an open file is performed by the closefile ( ) function
    B. the second open ( ) argument describes the open mode and defaults to `w'
    C. if open ( ) `s second argument is `r' the file must exist or open will fail
    D. if open ( )'s second argument is `w' and the invocation succeeds, the previous file's content is lost

  • Question 22:

    What is the expected behavior of the following code?

    A. it outputs 0
    B. it outputs 1
    C. it raises an exception
    D. it outputs 2

  • Question 23:

    The __bases__ property contains:

    A. base class location (addr)
    B. base class objects (class)
    C. base class names (str)
    D. base class ids (int)

  • Question 24:

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

    A. __upper__
    B. __super__
    C. __ancestors__
    D. __bases__

  • Question 25:

    What is the expected output of the following code?

    A. 21
    B. 2
    C. 3
    D. 12

  • Question 26:

    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 (1)

  • Question 27:

    What is the expected output of the following code?

    A. abcef
    B. The program will cause a runtime exception/error
    C. acdef
    D. abdef

  • Question 28:

    What is the expected behavior of the following code?

    A. it outputs 2
    B. it raises an exception
    C. it outputs 1
    D. it outputs 0

  • Question 29:

    What is the expected behavior of the following code?

    A. it outputs 321
    B. it outputs 123
    C. it outputs 6
    D. it raises an exception

  • Question 30:

    Assuming that the math module has been successfully imported, which of the following expressions evaluate to True? (Select two answers)

    A. math.hypot(3, 4) == math.sqrt(25)
    B. math.hypot(2, 5) == math.trunc(2.5)
    C. math.hypot(2, 5) == math.trunc(2.5)
    D. math.ceil(2.5) == math.floor(2.5)

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.