03.02 · Loops / Practice · 7 min
Include the final one in the countdown
The countdown reaches two and stops. Which range argument left one out?
Activity 2 of 8 in Loops
Python 2: Logic, Loops & Functions / 03.02
Practice countdown ranges
Not started
Fix the excluded stop so the loop prints every number from 10 through 1.
Your lesson progress
Empty: not started. Yellow: in progress. Green: complete. Marking the whole activity complete does not replace your test results. These circles save in this browser for this pilot.

Your task: count down from ten through one
Keep start assigned to 10. Repair the range so the existing print(number) runs for 10, 9, 8 and every remaining whole number down to 1, in order. Do not print 0 and do not add separate print calls to patch the missing value.
Check challenge compares the complete output, starting value, final loop value and the first and last output lines. These fixed-input checks do not prove the syntax used or all inputs. After passing, try start = 3: expect 3, 2 and 1. Restore 10 before checking again.
Build it one step at a time
Prefer learning by typing? Work through short instructions, run the Python code and check each change before continuing. Your guided project saves separately from the challenge below.
The mini-lesson opens in a new tab. Your own code carries forward; each step has a focused check and an optional hint.
Start mini-lesson(opens in a new tab)3 steps · Saved work · Instant feedback
YOUR TURN
Count down through the final one
Keep start = 10. Fix the range so the loop prints 10 through 1 in descending order, one number per line. Do not print zero or add separate print calls.
10 9 8 7 6 5 4 3 2 1
Keep the starting inputs. Print these lines in this order, without extra output.
- Keep start at 10
- Finish with number at 1
- The first line is 10
- The tenth line is 1
Edit Python, then run it. Check challenge checks your output and the listed Python requirements. Your code saves on this browser after a short pause. Sign in and choose Save account draft to keep it across devices. Word wrap is enabled.
Ready to checkRun the checks to see your results here.
Your check results
Need a nudge?
The stop is excluded even when counting down
A negative step changes the direction, not the excluded-stop rule. Which stop lets 1 be visited without visiting 0?
One possible solution
Your code may look different and still be correct. Compare the approach with your own.
range(start, 0, -1) reaches 1 and excludes 0. Verify a smaller starting value to see that the loop still follows the rule.
start = 10
for number in range(start, 0, -1):
print(number)Ready to try it?
Practice in your browser and see your results.
Progress details
Have a question?
Ask the Code Zone community.
Ask a question in The Code Zone (opens in a new tab)Continue learning

7 days freeTry The Code Zone
THE CODE ZONE COMMUNITY
Your next step is easier together.
Try the community free for 7 days.
No charge during your trial. Choose your plan on Skool.
- Ask questions and get support in the community
- Watch every course video walkthrough
- Find a study buddy in the 24/7 study room
Make the most of your trial with Premium.
Choose Premium on Skool to try Thursday live help sessions. Bring your questions, work through code, and get unstuck together.
Scheduled Thursdays in Eastern Time. Check the Skool calendar for your local date and time.
Have a website account? Sign in