PCEP Practice Question: Data Types, Variables, Basic I/O and Operators
A developer writes: total = 2 ** 3 + 4. What is the value of total?
⚠ Common exam trap
Python Institute often tests operator precedence by combining exponentiation with addition, trapping candidates who mistakenly evaluate left-to-right or confuse ** with multiplication.
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
✓
12
In Python, the exponentiation operator (**) has higher precedence than addition (+). Therefore, 2 ** 3 is evaluated first, yielding 8. Then 8 + 4 equals 12. Option B 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.
- ✗
16
Why it's wrong here
This would be 2**4 = 16, but the expression is 2**3+4.
- ✓
12
Why this is correct
Correct: 2**3 = 8, 8+4 = 12.
- ✗
14
Why it's wrong here
No clear calculation results in 14.
- ✗
10
Why it's wrong here
This would be 2**(3+4) = 128, not correct.
Go deeper
Related to this question
About these practice questions
Courseiva writes every PCEP question from scratch — 498 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.