Question 103 of 498
PCEP Practice Question: Data Types, Variables, Basic I/O and Operators
A program checks divisibility. Which condition correctly determines if a number n is divisible by 7?
⚠ Common exam trap
The PCEP exam often tests the distinction between division operators (/, //, %) and expects candidates to know that only the modulo operator (%) correctly checks divisibility, not the quotient operators.
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
✓
n % 7 == 0
The modulo operator (%) returns the remainder of the division of n by 7. If the remainder is 0, then n is exactly divisible by 7. This is the standard way to test divisibility 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.
- ✗
n / 7 == 0
Why it's wrong here
Division returns float, only true if n=0.
- ✗
n // 7 == 0
Why it's wrong here
This checks if n is less than 7.
- ✓
n % 7 == 0
Why this is correct
Correct: remainder 0 means divisible.
- ✗
n % 7 != 0
Why it's wrong here
This checks not divisible.
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 25, 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.