Python Institute PCAP Exam
Certified Associate in Python Programming Exam (Page 2 )

Updated On: 19-Jan-2026

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

  1. the__name__variable content determines the way in which the module was run
  2. a package can be stored as a tree of sub-directories/sub-folders
  3. __pycache__is the name of a built-in variable
  4. hashbang is the name of a built-in Python function

Answer(s): B,C



Python's built-in function named open () tries to open a file and returns:

  1. an integer value identifying an opened file
  2. an error code (0 means success)
  3. a stream object
  4. always None

Answer(s): C


Reference:

https://www.programiz.com/python-programming/file-operation



A class constructor (Select two answers)

  1. can return a value
  2. cannot be invoked directly from inside the class
  3. can be invoked directly from any of the subclasses
  4. can be invoked directly from any of the superclasses

Answer(s): B,C



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

  1. tup [:]
  2. tup.append (0)
  3. tup [0]
  4. del tup

Answer(s): A,D



What is the expected output of the following snippet?

  1. True False
  2. True True
  3. False False
  4. False True

Answer(s): B



Viewing page 2 of 30
Viewing questions 6 - 10 out of 147 questions



Post your Comments and Discuss Python Institute PCAP exam prep with other Community members:

Join the PCAP Discussion