Exerpad
Exercise 9 · Chapter: For LoopsOptional+50 XP

Fix the Step

This program should count backwards from 5 to 1, but nothing prints. Fix it!

Expected output:

5
4
3
2
1

Hint: When counting backwards, the step should be negative.

Need a hint?
3 available · costs 5 XP each
python
for i in range(5, 0, 1):
print(i)
Output
Run your code to see the output here.