Python Institute PCAP-31-03 Exam Questions
Certified Associate in Python Programming Exam (Page 5 )

Updated On: 21-Feb-2026

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]

  1. string[0] == string[-1]
  2. string is None
  3. len (string] == 3
  4. string[0] == 'o'

Answer(s): B,C



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

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

Answer(s): B,D



What is the expected behavior of the following code?

  1. it outputs 'None'
  2. it outputs 3
  3. it raises an exception
  4. it outputs 0

Answer(s): D



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)

  1. str(Object) == 'Object'
  2. _name == _main_'
  3. ClassA. _module_ == 'ClassA'
  4. len(ClassB.__bases__) == 1

Answer(s): B,D



What is true about Object-Oriented Programming in Python? (Select two answers)

  1. if a real-life object can be described with a set of adjectives, they may reflect a Python object method
  2. the same class can be used many times to build a number of objects
  3. each object of the same class can have a different set of methods
  4. a subclass is usually more specialized than its superclass

Answer(s): B,D






Post your Comments and Discuss Python Institute PCAP-31-03 exam dumps with other Community members:

Join the PCAP-31-03 Discussion