2 packs: 15% off with code BUY2. 3 or more: 20% off with code BUY3.

PYTHON INSTITUTE · PCAP-31-03

Python Institute PCAP-31-03 Exam Practice Questions

99% pass rateUpdated 1 Nov 2026129 questions2 PDFs, instant download
5.04 reviews
(4 customer reviews)

US$39

Every question with the correct answer and why the other options are wrong.

Download the free sample

Card, Apple Pay, Google Pay or PayPal. Download links are on your order page and in your email the moment you pay.

99% pass rate. Pass or your money back.Fail the exam after using this pack and we refund it, or swap it for any other pack. How the guarantee works
Dumps for Python Institute PCAP-31-03 were very accurate. Passed my exam with 96% marks. I suggest everyone study from Cert Stash dumps.
KenPCAP-31-03
Category:
TRY BEFORE YOU BUY

Three of the 129 questions in this pack

Question 1

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

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

Correct answer: C, D. __pycache__ is a folder that stores semi-compiled Python modules; the sys.path variable is a list of strings

Option C is correct: __pycache__ is a directory created by Python to store bytecode (.pyc files) for faster module loading. Option D is correct: sys.path is a list of strings representing directories where Python searches for modules. Option A is incorrect because the initialization file is __init__.py (with double underscores), not init.py. Option B is incorrect because packages are distributed as archives (zip, tar, etc.) or via package managers, not as mp3 files.

Why the other options are wrong

  • A. The correct filename is __init__.py with double underscores on both sides, not init.py.
  • B. Packages are distributed as archives or via package managers like pip, never as mp3 audio files.

Question 2

A Python package named pypack includes a module named pymod.py which contains a function named pyfun(). Which of the following snippets will let you invoke the function? (Choose two.)

  1. from pypack.pymod import pyfun pyfun()
  2. import pypack pymod.pyfun()
  3. from pypack import * pyfun()
  4. import pypack import pypack.pymod pypack.pymod.pyfun()
Show answer and explanation

Correct answer: A, D. from pypack.pymod import pyfun pyfun(); import pypack import pypack.pymod pypack.pymod.pyfun()

Option A is correct: 'from pypack.pymod import pyfun' directly imports the function, allowing it to be called as pyfun(). Option D is correct: importing pypack and then pypack.pymod allows calling the function via the full path pypack.pymod.pyfun(). Option B is incorrect because importing pypack doesn't automatically import its submodules; pymod would be undefined. Option C is incorrect because 'from pypack import *' only works if __init__.py explicitly defines __all__ or imports pyfun; otherwise pyfun remains inaccessible.

Why the other options are wrong

  • B. Importing pypack does not automatically import submodules; pymod is not defined in the namespace.
  • C. The 'from pypack import *' statement only imports names defined in pypack's __init__.py or its __all__ list, and pyfun is in a submodule.

Question 3

Assuming that the code below has been executed successfully, which of the following expressions will always evaluate to True? (Choose two.) import random v1 = random.random() v2 = random.random()

  1. len(random.sample([1,2,3],1)) > 2
  2. v1 == v2
  3. random.choice([1,2,3]) > 0
  4. v1>1
Show answer and explanation

Correct answer: C. random.choice([1,2,3]) > 0

Option C is correct: random.choice([1,2,3]) always returns one of the three positive integers 1, 2, or 3, all of which are greater than 0, so this always evaluates to True. Option A is incorrect because random.sample([1,2,3],1) returns a list with exactly one element, and len() of that is 1, which is not greater than 2. Option B is incorrect because random.random() generates floats between 0.0 and 1.0, and the probability that two consecutive calls return identical values is virtually zero. Option D is incorrect because random.random() always returns a value in the range [0.0, 1.0), never greater than 1.

Why the other options are wrong

  • A. random.sample([1,2,3],1) returns a list of length 1, and 1 is not greater than 2.
  • B. Two consecutive calls to random.random() produce different floating-point values with extremely high probability.
  • D. random.random() always returns a value in the range [0.0, 1.0), which is never greater than 1.

See all 32 free questions Get the full pack, US$39

REVIEWS

4 reviews for Python Institute PCAP-31-03 Exam Practice Questions

  1. Ken –

    Dumps for Python Institute PCAP-31-03 were very accurate. Passed my exam with 96% marks. I suggest everyone study from Cert Stash dumps.

  2. Ingrid Nair –

    Really appreciate it

    Got through my exam using this

  3. Cesar Argenbright –

    Your PCAP-31-03 exam guide is valid in India. Thanks for your helpful questions.

  4. Wei Sahin –

    Thanks, passed first time

    Recommend for PCAP prep.

Only logged in customers who have purchased this product may leave a review.

How much of the Python Institute PCAP-31-03 bank is free?

129 questions in the bank

Each step includes the one before, so buying only adds new questions.

  • You are here10questionsFree sampleThree on this page, all ten as a PDF.Download the sample
  • 3225% of the bankPractice pageFree on the site, every answer explained.Go to the practice page
  • 64the first half of the packHalf PackFree by email, as one PDF, every answer explained.Get the Half Pack
  • 129100%, the whole bankFull pack, US$39Plus the questions-only PDF, monthly updates, refund if you fail.Get the full pack
ABOUT THIS PACK

What’s in the Python Institute PCAP-31-03 pack

  • 129 questions, MCQs and fill-in-the-blank, mapped to the PCAP-31-03 exam objectives
  • Answers and explanations for every question, including the wrong options
  • A questions-only PDF for timed practice runs
  • Instant delivery by email the moment you check out
  • Free monthly updates for as long as the exam is live
  • Pass or your money back

A failed PCAP attempt costs another US$295, plus the time it takes to prepare again. This pack is US$39, paid once, and refunded if you fail.

What makes the PCAP hard

The PCAP is a significant step up from the PCEP. The questions go deeper into OOP, modules, exceptions and file handling. At US$295 a sitting, walking in underprepared is an expensive mistake.

Only 40 questions in 65 minutes, and 70% to pass, so 12 wrong answers ends it. With object-oriented programming worth roughly a third of the paper, a weak spot there is usually the whole exam.

About the exam

The PCAP is Python Institute's intermediate-level certification. It validates the ability to design, develop, debug and refactor multi-module Python programs with a strong focus on object-oriented programming. It is the next step after the PCEP and recommended before the PCPP professional certifications, delivered through Pearson VUE at testing centres or online.

Questions before you buy

How quickly do I receive it?

Straight away. The full PDF and a questions-only copy are emailed to you the moment your payment goes through, and the same links are on your order page.

Are updates included?

Yes. The pack is updated every month for as long as the exam is live, and updates are free for everyone who has bought it.

What if I fail the exam?

We refund the pack, or swap it for any other pack if you would rather keep studying. Sit the exam 7 to 30 days after buying, then send your official score report within 7 days of the exam date, as set out in the refund policy.

What is your pass rate?

99% of customers who prepare with a CertStash pack pass. If you do not, we refund the pack, or swap it for another pack.

Can I share it with colleagues?

Each purchase is licensed to one person. For a team, school or training organisation, email support@certstash.com for a licence that fits.