PCEP Practice Question: Data Types, Variables, Basic I/O and Operators
After executing: a = 5; b = 2; c = a // b; d = a % b; e = a ** b. What is the value of (c + d) * 2 - e?
⚠ Common exam trap
Python Institute often tests the distinction between floor division (//) and true division (/), and the correct order of operations (PEMDAS), where candidates may incorrectly compute c as 2.5 or misapply the exponentiation operator.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
-19
After executing the code, a=5, b=2, c=5//2=2 (floor division), d=5%2=1 (remainder), e=5**2=25 (exponentiation). Then (c+d)*2-e = (2+1)*2-25 = 3*2-25 = 6-25 = -19. Option B is correct because it matches this calculation.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
-20
Why it's wrong here
The floor division and modulo yield c = 2 and d = 1, while exponentiation gives e = 25, so (2 + 1) * 2 - 25 = -19, not -20. This distractor tempts candidates who miscompute 5 ** 2 as 24 or treat the modulo remainder as 0.
- ✓
-19
Why this is correct
Integer division gives c = 2, modulo gives d = 1, and exponentiation gives e = 25. So (2 + 1) * 2 - 25 = 6 - 25 = -19, matching the computed value exactly.
- ✗
-11
Why it's wrong here
Working through the operators: `a // b` gives 2, `a % b` gives 1, and `a ** b` gives 25. So `(c + d) * 2 - e` becomes `(2 + 1) * 2 - 25`, which equals -19, not -11. The value -11 tempts anyone who misreads `**` as multiplication, computing `5 * 2 = 10` instead of 25.
- ✗
-15
Why it's wrong here
Working through the operators: `//` gives floor division (5 // 2 = 2), `%` gives the remainder (5 % 2 = 1), and `**` gives exponentiation (5 ** 2 = 25). So (2 + 1) * 2 - 25 = 6 - 25 = -19, not -15. The value -15 tempts those who compute 5 ** 2 as 10.
About these practice questions
Courseiva writes every PCEP question from scratch — 482 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This PCEP practice question is part of Courseiva's free Python Institute certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the PCEP exam.