• Wrong document? Swap it for free
  • Written by students who passed
  • Immediately available after payment
  • Read online or as PDF
Sell
Where do you study
Your language
Document preview thumbnail
Preview 4 out of 50 pages
Exam (elaborations)

Python PCEP Certification 2025 60 QA Fundamentals Complete Practice Exam

Document preview thumbnail
Preview 4 out of 50 pages

Python PCEP Certification 2025 — 60 Practice Questions Fundamentals Verified

Content preview

Python PCEP Certification 2025 — 60 Practice Questions
Fundamentals Verified

Series:
CrashCourses Professional Study Series

Author:
Dr Z. Moomba, MBChB, MRCPsych | BethelWellness Ltd

Exam Target:
Python Institute PCEP

Year:
2025/2026

Format:
60 Questions with Verified Answers and Rationales


>
Author's Note:
This document is an original work produced for the CrashCourses Professional Study Series.
Clinical questions and professional scenarios were composed by Dr Z. Moomba based on current
exam objectives, published guidelines, and evidence-based sources (2024–2025). All patient
names, ages, and case details are fictional. Any resemblance to existing published Q&A banks is
coincidental. For personal study use only — not for reproduction or redistribution.


PART 1: CORE PRINCIPLES & FOUNDATIONS

Question 1
A triage nurse at a London A&E enters a patient's age into a custom Python interface. The prompt
reads: `patient_age = input("Input age in years: ")`. If the nurse types `40` and the system
subsequently evaluates `type(patient_age)`, what will be returned?
A) The integer class type ``
B) The floating-point class type ``
C) The string class type ``
D) The character class type ``




,Answer: C

Rationale:

Lead:
In Python 3, the `input()` function inherently processes all standard user input as string objects,
regardless of whether the user enters strictly numerical digits.

Discriminator:
The explicit absence of a casting function (such as `int()`) around the `input()` call dictates that the
data retains its original string format.

Distractor:
Option A is the most compelling error, as `40` is logically an integer, but the interpreter does not
automatically infer or convert data types from standard input streams.

Examiner Insight:
Attempting mathematical operations on uncast input data (such as calculating clinical scores) will
trigger a `TypeError`; always manually cast variables [Python Docs 2025].


Question 2
An epidemiologist in a field clinic is declaring a variable to store a patient's baseline resting heart
rate. Which identifier adheres to Python's legal naming rules?
A) `1_resting_hr`
B) `resting-hr`
C) `_resting_hr`
D) `resting hr`

Answer: C

Rationale:

Lead:
Python variable identifiers may only consist of alphanumeric characters and underscores, and
they must never commence with a numeric digit.

Discriminator:





,`_resting_hr` strictly follows these lexical rules, successfully utilizing an underscore as a valid
starting character.

Distractor:
Option B (`resting-hr`) appears logical to beginners but introduces a hyphen, which the Python
interpreter evaluates as a subtraction operator, throwing a `SyntaxError`.

High-Yield Point:
A leading underscore is a strong PEP 8 convention indicating that a variable or method is intended
for internal use within a specific module [PEP 8].


Question 3
A blood bank script calculates the leftover units of O-negative blood after equal distribution
among 3 trauma wards. The code executes: `print(10 % 3)`. What value is displayed?
A) 3.33
B) 3
C) 1
D) 0

Answer: C

Rationale:

Lead:
The modulo operator `%` evaluates the division of two numbers and returns strictly the
mathematical remainder.

Discriminator:
Dividing 10 by 3 yields a quotient of 3 with a remainder of 1; the operator isolates and outputs this
remainder.

Distractor:
Option B represents the result of floor division (`//`), a frequent point of confusion when parsing
mathematical operators in Python.

Clinical Pearl:
Modulo arithmetic is heavily utilized in healthcare scheduling algorithms to calculate shift rotations
or determine if a specific date falls on a cycle boundary [AWS Docs 2025].




, Question 4
A pharmacy inventory script utilizes the walrus operator to simultaneously evaluate and assign
medication stock levels. Which implementation correctly applies this feature?
A) `if (inventory := check_inventory()) > 0:`
B) `if inventory := check_inventory() > 0:`
C) `if (inventory = check_inventory()) > 0:`
D) `if inventory == check_inventory() > 0:`

Answer: A

Rationale:

Lead:
The walrus operator `:=` enables assignment of a value to a variable within an expression.
Parentheses are strictly necessary here to enforce the correct order of evaluation.

Discriminator:
The parentheses guarantee that the result of `check_inventory()` is bound to `inventory` before the
`> 0` comparison occurs.

Distractor:
Option B is syntactically valid but logically flawed; it assigns the boolean result of the comparison
(`True` or `False`) to the variable rather than the actual stock integer.

Key Principle:
This operator is highly efficient for reducing redundant function calls within clinical `while` loops
and complex conditional branching [PEP 572].


Question 5
A telemetry script formats a patient's surname and bed number using an f-string. The assigned
variables are `surname = "Patel"` and `bed = 12`. Which syntax correctly implements the f-string?
A) `f"Patient {surname} is in Bed {bed}"`
B) `"Patient {surname} is in Bed {bed}".format(f)`
C) `f("Patient {surname} is in Bed {bed}")`
D) `format("Patient {surname} is in Bed {bed}")`

Document information

Study
Uploaded on
March 23, 2026
Number of pages
50
Written in
2025/2026
Type
Exam (elaborations)
Contains
Questions & answers
$16.98

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Seller avatar
Reputation scores are based on the amount of documents a seller has sold for a fee and the reviews they have received for those documents. There are three levels: Bronze, Silver and Gold. The better the reputation, the more your can rely on the quality of the sellers work.
CrashCourses
4.7
(9)
Sold
145
Followers
49
Items
664
Last sold
7 months ago



Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions