In this lesson
- It starts with a question. Ravi writes a procedure: “Start a counter at 10. While the counter is not 0, take away 3.” What happens?
- The idea you will find. Every pass must move towards a stop the procedure can actually reach. — Taking away 3 from 10 jumped over 0, so the test never fired. Taking away 2 landed on it in five passes. Before trusting any repeated procedure, ask two things: does each pass get closer to the stopping condition, and can it miss? A safer test such as “while more than 0” cannot be jumped over.
- How you learn it. By doing: a slider, sorting.
- Length. 6 short steps. Progress saves on this phone.
Part of Step-by-Step Procedures
Designing a procedure that finishes, and knowing roughly how long it takes.