PCEP Computer Programming and Python Fundamentals Practice Question
What is the result of the following expression? 3 + 4 * 2 ** 3 // 5
⚠ Common exam trap
The PCEP exam often tests the combination of exponentiation, multiplication, floor division, and addition in a single expression to trap candidates who forget that `**` binds tighter than `*` and `//`, or who incorrectly apply left-to-right evaluation across all operators.
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
✓
9
The expression follows Python's operator precedence: exponentiation (`**`) has the highest precedence, then multiplication (`*`) and floor division (`//`) are evaluated left to right, and finally addition (`+`). First, `2 ** 3` computes to 8. Then `4 * 8` gives 32, and `32 // 5` yields 6 (floor division truncates toward negative infinity, but here it's positive). Finally, `3 + 6` equals 9. Thus, option A is correct.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
9
Why this is correct
Correct order: 2**3=8, 4*8=32, 32//5=6, 3+6=9.
- ✗
7
Why it's wrong here
This would be 3+4=7 if evaluated left to right ignoring precedence.
- ✗
6
Why it's wrong here
This results if // is applied before *.
- ✗
11
Why it's wrong here
This would be 4*2=8, 3+8=11, then ignoring ** and //.
Go deeper
Related to this question
About these practice questions
This PCEP question is part of Courseiva's 498-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →
Same concept, more angles
1 more way this is tested on PCEP
These questions test the same concept from different angles. Work through them to make sure you can recognise it however the exam phrases it.
Variation 1. A developer writes the following code: result = (5 + 3) * 2 ** 3 // 4. What is the value of result?
easy- A.8
- ✓ B.16
- C.13
- D.64
Why B: Python follows the operator precedence rules: exponentiation (**) is evaluated before multiplication and division, and multiplication/division are evaluated before addition/subtraction. The expression evaluates as: 2 ** 3 = 8, then (5 + 3) = 8, then 8 * 8 = 64, then 64 // 4 = 16. The integer division (//) yields an integer result of 16.
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.