Python-institute

PCAP-31-03 practice test

Practice with 15 free Testara sample questions, or choose paid access to the full 92-question bank.

Provider
Python-institute
Question bank
92
Free sample
15 questions
Publisher
Testara

About this practice material

This page covers Testara's practice question bank for PCAP-31-03, a certification listed under Python-institute. Questions use original, exam-style scenarios and are not questions from the official certification exam.

Testara is an independent practice platform and is not affiliated with, endorsed by, or authorized by Python-institute. The certification credential is issued by Python-institute, not Testara. Certification and provider names belong to their respective owners.

Start practicing

The guest demo does not save an attempt. Sign in before buying access.

Try 15 questions free

Available without signing in

Free sample questions

These 15 questions and their explanations are server-rendered so you can inspect the material before opening the interactive demo.

  1. Question 1 · 1

    What is true about Python packages? (Choose two.)

    Choose all answers that apply.

    • a code designed to initialize a package’s state should be placed inside a file named init.py
    • a package’s contents can be stored and distributed as an mp3 file
    • __pycache__ is a folder that stores semi-compiled Python modules
    • the sys.path variable is a list of strings
  2. Question 2 · 1

    What is true about the following snippet? (Choose two.)

    Choose all answers that apply.

    Question illustration 1
    • the string what a pity will be seen
    • the string it's nice to see you will be seen
    • the code will raise an unhandled exception
    • the string I feel fine will be seen
  3. Question 3 · 1

    Which of the following statements are true? (Choose two.)

    Choose all answers that apply.

    • II in ASCII stands for Information Interchange
    • a code point is a number assigned to a given character
    • ASCII is synonymous with UTF-8
    • \e is an escape sequence used to mark the end of lines
  4. Question 4 · 1

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

    Choose all answers that apply.

    Question illustration 1
    • class Class_2(B,D): pass
    • class Class_1(C,D): pass
    • class Class_3(A,C): pass
    • class Class_4(D,A): pass
  5. Question 5 · 1

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

    Choose all answers that apply.

    Question illustration 1
    • 'var' in Object.__dict__
    • 'var' in Class.__dict__
    • len(Object.__dict__) == 1
    • 'prop' in Class.__dict__
  6. Question 6 · 1

    What is the expected behavior of the following code?

    Choose one answer.

    Question illustration 1
    • it outputs -2
    • it outputs 2.0
    • it outputs 0.0
    • the code is erroneus and it will not execute
  7. Question 7 · 1

    Which of the following expressions evaluate to True? (Choose two.)

    Choose all answers that apply.

    • 'abc'.upper() < 'abc'
    • '1'+'2' * 2 != '12'
    • 3 * 'a' < 'a' * 2
    • 11 == '011'
  8. Question 8 · 1

    Assuming that the snippet below has been executed successfully, which of the following expressions will evaluate to True? (Choose two.) string = 'SKY'[::-1] string = string[-1]

    Choose all answers that apply.

    • len(string) == 1
    • string[0] == 'Y'
    • string[0] == string[-1]
    • string is None
  9. Question 9 · 1

    What is true about the __bases__ property?

    Choose one answer.

    • there is no such property
    • it is accessible inside a class and an object
    • it is accessible inside a class
    • it is accessible inside an object
  10. Question 10 · 1

    Which of the following statements are true? (Choose two.)

    Choose all answers that apply.

    • if invoking open() fails, the value None is returned
    • open() is a function which returns an int that represents a physical file handle
    • the second open() argument is optional
    • instd, outstd, errstd are the names of pre-opened streams
  11. Question 11 · 1

    What is the expected behavior of the following code?

    Choose one answer.

    Question illustration 1
    • it outputs 2
    • it raises an exception
    • it outputs 1
    • it outputs 0
  12. Question 12 · 1

    Which of the following expressions evaluate to True? (Choose two.)

    Choose all answers that apply.

    • ord("0") - ord("9") == 10
    • len("''") == 2
    • chr(ord('z') - 1) == 'y'
    • len(''1234'') == 4
  13. Question 13 · 1

    Which of the following expressions evaluate to True? (Choose two.)

    Choose all answers that apply.

    • 'xYz'.lower() > 'XY'
    • '8'+'8' ! = 2 * '8'
    • float ('3.14') == str('3.' + '14')
    • 121 + 1 == int('1' + 2 * '2')
  14. Question 14 · 1

    What is the expected behavior of the following code? the_list = "alpha;beta;gamma".split(";") the_string = ''.join(the_list) print(the_string.isalpha())

    Choose one answer.

    • it outputs True
    • it outputs False
    • it outputs nothing
    • it raises an exception
  15. Question 15 · 1

    Which of the following invocations are valid? (Choose two.)

    Choose all answers that apply.

    • sort("python")
    • "python".find("")
    • "python".sort()
    • sorted("python")

Each purchase applies to this certification. Prices are one-time payments, not monthly subscriptions.

Starter

$29 USD one time

Full access to one certification's question bank in standard practice mode for 60 days.

  • Full question bank for one certification
  • 60 days of access
  • Standard practice mode
  • Question notes and community discussions
  • Attempt scores and answer review

Professional

$49 USD one time

Full access to one certification's question bank, custom test controls and advanced analytics for 60 days.

  • Custom test builder
  • Timers and question selection
  • Randomized question and answer order
  • Advanced performance and weak-question analytics
  • Priority customer support
Try 15 questions free