PCEP Practice Question: Data Types, Variables, Basic I/O and Operators
Exhibit
a = 10 // 3 b = 10 % 3 print(a, b)
Refer to the exhibit. What is the output?
⚠ Common exam trap
Python Institute often tests the difference between `/` (true division) and `//` (floor division) and `%` (modulo), and the trap here is that candidates confuse the modulo operator `%` with floor division `//`, expecting the integer quotient instead of the remainder.
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 1
The code in the exhibit is `print(10//3, 10%3)`. The `//` operator performs floor division, which for positive numbers truncates the decimal part, so `10//3` yields 3. The `%` operator returns the remainder of the division, `10%3` yields 1. Thus the output is '3 1'.
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.0 1.0
Why it's wrong here
Results are integers, not floats.
- ✗
3 3
Why it's wrong here
Remainder is 1, not 3.
- ✗
3.333 1
Why it's wrong here
// does integer division, not float.
- ✓
3 1
Why this is correct
Correct.
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.