Loop builder
Set where a loop starts, where it stops and how much it steps by, and watch it run. Loops repeat work so the computer does it for you.
Prints: 0, 1, 2, 3, 4
Change the controls until it fits.
What to notice
- range(start, stop, step) stops before it reaches stop.
- A step of 2 visits every other number.
- A negative step counts down.
Challenges
- Make the loop print exactly the target numbers.
- Make it run exactly 5 times.
- Count down from 10 to 1.