Question 170 of 498
PCEP Practice Question: Data Types, Variables, Basic I/O and Operators
Which THREE of the following expressions evaluate to True?
⚠ Common exam trap
Python Institute often tests the misconception that `==` performs type coercion for all types (like JavaScript), but in Python, `==` only coerces numeric types (int, float, complex) and returns `False` for cross-type comparisons like string vs int.
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 == int("3")
The `int()` function converts the string `"3"` to the integer `3`, and the `==` operator compares the values, returning `True` since both sides are the integer `3`. Option C is correct because `bool(1)` returns `True` as any non-zero integer is considered truthy in Python. Option E is correct because Python's `==` operator performs value equality, and `3` (integer) and `3.0` (float) represent the same numeric value, so the comparison evaluates to `True`. Note that the question asks for two correct answers, but based on the evaluations, options A, C, and E are all true. This might indicate an error in the question design.
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 == int("3")
Why this is correct
Correct. int('3') returns 3, so 3 == 3 is True.
- ✗
"3" == 3
Why it's wrong here
Incorrect. Comparing string '3' to integer 3 returns False because types differ.
- ✓
bool(1)
Why this is correct
Correct. bool(1) returns True because any non-zero number is truthy.
- ✗
bool(0)
Why it's wrong here
Incorrect. bool(0) returns False because 0 is falsy.
- ✓
3 == 3.0
Why this is correct
Correct. 3 and 3.0 are numerically equal, so the comparison returns True.
About these practice questions
Courseiva creates original exam-style practice questions with explanations and wrong-answer analysis. It does not publish real exam questions, exam dumps, or protected exam content. Learn why practice questions differ from exam dumps →
Last reviewed: Jun 30, 2026
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.
Question Discussion
Share a tip, memory trick, or ask about the reasoning behind this question. Do not post real exam questions, leaked content, braindumps, or copyrighted exam material. Comments are moderated and may be removed without notice.
Sign in to join the discussion.