PCEP Practice Question: Data Types, Variables, Basic I/O and Operators
A Python script contains the following code:
num = 7 result = num ** 2
print(result)
What is the output?
⚠ Common exam trap
Test-takers frequently confuse the exponentiation operator ** with the multiplication operator *, which would produce 14 instead of 49.
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
✓
49
The exponentiation operator ** raises the left operand to the power of the right operand. With num assigned 7, num ** 2 computes 7 squared, which is 49. The other options misinterpret the operator as multiplication, no operation, or an error, but none of those apply because both operands are integers and the operator is valid.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Error: unsupported operand type(s)
Why it's wrong here
Both operands are integers, so the ** operator is valid and no error occurs. The exponentiation operator works with integers and floats in Python. An error would only arise if an operand were of an incompatible type, such as a string. Thus, the script runs successfully and prints 49.
- ✓
49
Why this is correct
The ** operator in Python performs exponentiation. Here, num ** 2 raises 7 to the power of 2, which equals 49. Therefore, the print statement outputs 49. This is the correct behavior for the exponentiation operator, which is a fundamental arithmetic operator in Python.
- ✗
7
Why it's wrong here
The expression num ** 2 does not simply return the original value. It computes 7 raised to the power of 2, which is 49. Printing 7 would imply that the exponentiation operator has no effect, which is incorrect. The ** operator always performs exponentiation when applied to two numbers.
- ✗
14
Why it's wrong here
The multiplication operator * would yield 14, but the ** operator is exponentiation, not multiplication. This option misinterprets the operator, leading to an incorrect result. In Python, ** raises the left operand to the power of the right operand. Since 7 squared is 49, 14 is incorrect.
Go deeper
Related to this question
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 and reviewed by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
Last reviewed September 2026 · checked against the official Python Institute exam blueprint
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.