PCEP Practice Question: Data Types, Variables, Basic I/O and Operators
Which TWO of the following expressions produce the integer 5?
⚠ Common exam trap
Python Institute often tests the distinction between `/` (true division returning float) and `//` (floor division returning int), as well as the difference between numeric types (int vs. float vs. string), to catch candidates who overlook Python's implicit type conversions.
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
✓
10 // 2
`10 // 2`, uses floor division in Python, which divides 10 by 2 and returns the integer quotient 5, discarding any fractional remainder. Option C, `int(5.7)`, truncates the decimal part of the float 5.7, converting it directly to the integer 5. Both expressions produce the exact integer value 5.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
"5"
Why it's wrong here
String, not integer.
- ✓
10 // 2
Why this is correct
Floor division returns integer 5.
- ✓
int(5.7)
Why this is correct
int() truncates to integer 5.
- ✗
5.0
Why it's wrong here
Float, not integer.
- ✗
10 / 2
Why it's wrong here
Returns float 5.0.
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.