Courseiva
Free · No account needed · No credit card

Certified Entry-Level Python Programmer PCEP Practice Test

482 questions with instant explanations, domain breakdown, and wrong-answer analysis. Built for the real exam.

Instant feedback after each answer
Full explanations included
Domain score breakdown
Real exam: 45 min
Pass mark: 700/1000

The vendor is retiring this exam on August 31, 2026.

You can still schedule and take PCEP until that date. See Python Institute's current PCEP exam version

Sample questions with explanations

This is exactly what you see during practice — question, options, and a full explanation after you answer.

Q1Computer Programming and Python Fundamentalshard
Full explanation →

Which THREE of the following statements about Python data types are correct? (Choose three.)

AStrings are mutable.
BSets are immutable.
Tuples are immutable.Correct
Lists are mutable.Correct

Tuples in Python are immutable, meaning once created, their elements cannot be changed, added, or removed. This immutability makes tuples hashable and usable as dictionary keys, unlike lists.

Q2Data Types, Variables, Basic I/O and Operatorsmedium
Full explanation →

A developer wants to read a floating-point number from user input and compute its square. Which code snippet correctly accomplishes this?

Anum = input(); result = num * num
num = float(input()); result = num ** 2Correct
Cresult = input() ** 2
Dnum = int(input()); result = num ** 2

It uses `float(input())` to convert the user's input (which is always a string) into a floating-point number, and then computes the square using the exponentiation operator `**`. This ensures that decimal values are handled correctly, which is required for computing the square of…Read full explanation

Q3Data Types, Variables, Basic I/O and Operatorshard
Full explanation →

You are a junior developer at a logistics company. Your team is building a system to calculate shipping costs based on package weight. The system reads weight from user input. A colleague wrote the following code: weight = input('Enter weight in kg: '); cost = weight * 2.5; print('Shipping cost:', cost). However, when testing with weight 10, the output is 'Shipping cost: 10101010101010101010' (the string '10' repeated 2.5 times? Actually, 2.5 is float, but string multiplied by float causes TypeError? Wait, string * float raises TypeError. But the symptom described suggests the code runs but produces unexpected output. Let me re-read: The output shows '10101010101010101010' which is the string '10' repeated 10 times? That would happen if weight is string and multiplied by int 10. But the code multiplies by 2.5. Actually, string * float raises TypeError, so the code would crash. The symptom must be plausible. Let me adjust: The code actually has weight = input(...), then cost = weight * 2.5, but if weight is '10', then '10' * 2.5 raises TypeError. So the symptom cannot be that output. I need to fix the stem to make sense. Instead, let's say the code is: weight = input('Enter weight: '); cost = float(weight) * 2.5; print('Cost:', cost). But then no issue. I'll create a scenario where the developer forgot to convert input to float, and then tries to multiply string by float, which causes TypeError. The correct action is to convert input to float. I'll adjust the stem accordingly. Let me rewrite the stem properly. Stem: You are a developer at a shipping company. The system calculates shipping cost as weight (kg) times rate 2.5. A colleague wrote: weight = input('Enter weight: '); cost = weight * 2.5; print('Cost:', cost). When testing with weight 10, the program crashes with TypeError. Which action should you take to fix the code?

AChange weight = int(input('Enter weight: '))
BChange cost = weight * 2.5 and catch TypeError
CChange cost = int(weight) * 2.5
Change weight = float(input('Enter weight: '))Correct

`input()` always returns a string, and multiplying a string by a float (2.5) raises a `TypeError`. Converting the input to `float` ensures the multiplication is numeric, allowing decimal weights and producing the correct shipping cost.

Untimed Practice

Answer at your own pace. Explanation and domain tag shown immediately after each answer.

Timed Practice

Countdown timer starts immediately. Results and domain scores shown at the end — just like the real exam.

Why practice here?

Full explanations on every question

Not just the right answer — you get exactly why each wrong option is wrong, so you learn the concept, not the answer.

Domain score breakdown

After each session see your score by exam domain so you know exactly where to focus study time.

100% free, forever

No subscription, no trial, no email wall. Start a session in under 10 seconds.

Exam-style questions

Scenario-based, precise wording, realistic distractors — written to match what you actually see on exam day.

← All PCEP questionsPCEP exam guideStudy guidePractice by domain