PCEP Practice Question: Data Types, Variables, Basic I/O and Operators
Which of the following expressions will evaluate to True?
⚠ Common exam trap
Python Institute often tests the misconception that `==` requires identical data types, leading candidates to think `3 == 3.0` is `False`, or that operator precedence is left-to-right without considering multiplication before addition.
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
✓
3 == 3.0
Python's `==` operator performs value equality comparison, and the integer `3` and the float `3.0` represent the same numeric value. Python automatically converts the integer to a float for comparison, so `3 == 3.0` evaluates to `True`.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
3 == 3.0
Why this is correct
True, numeric comparison converts 3.0 to 3.
- ✗
2 + 2 * 2 == 8
Why it's wrong here
2 + 4 = 6, not 8.
- ✗
10 / 3 == 3
Why it's wrong here
10/3 ≈ 3.333, not equal to 3.
- ✗
'a' > 'b'
Why it's wrong here
False, 'a' has smaller ASCII code.
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.