Question 503 of 498
PCEP Control Flow, Loops, Lists and Logic Practice Question
A developer needs to implement a loop that prints numbers from 10 down to 1. Which loop correctly achieves this?
⚠ Common exam trap
Python Institute often tests the exclusive nature of the stop argument in `range()`, leading candidates to forget that the stop value is never included in the sequence.
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
✓
for i in range(10, 0, -1): print(i)
`range(10, 0, -1)` generates numbers from 10 down to 1 inclusive. The start is 10, the stop is 0 (exclusive), and the step is -1, so the sequence is 10, 9, 8, ..., 1. This matches the requirement exactly.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
for i in range(10, 0, -1): print(i)
Why this is correct
Correct; step -1 from 10 down to 1.
- ✗
for i in range(10, 0): print(i)
Why it's wrong here
Empty range; default step=1, start>stop.
- ✗
for i in reversed(range(1, 10)): print(i)
Why it's wrong here
Prints 9 to 1, not 10.
- ✗
for i in range(10, 1, -1): print(i)
Why it's wrong here
Prints 10 to 2 (stop exclusive).
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.