PCEP Practice Question: Data Types, Variables, Basic I/O and Operators
Which THREE of the following expressions evaluate to the integer 1? (Select three.)
⚠ Common exam trap
The PCEP exam often tests the distinction between Boolean `True` and the integer `1`, and the fact that arithmetic with a float operand always yields a float, not an integer.
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
✓
int(1.0)
`int(1.0)` explicitly converts the float `1.0` to an integer by truncating the decimal part, yielding the integer `1`. This is a standard type conversion function in Python.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
int(1.0)
Why this is correct
Truncates float to integer 1.
- ✓
2 // 2
Why this is correct
Integer division results in 1.
- ✗
True == 1
Why it's wrong here
Returns True (boolean), not integer 1.
- ✗
1 * 1.0
Why it's wrong here
Result is 1.0 (float).
- ✓
4 % 3
Why this is correct
Modulo gives remainder 1.
Go deeper
Related to this question
About these practice questions
One of 498 original PCEP practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. 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.