Vibecoding 2: a program is steps in order
The same two steps, add 3 and double, in two orders give two answers, and a loop repeats one step. Lesson 2 of the vibecoding course.
A loop: add 3, four times
- start: 2
- after 1 step: 5
- after 2 steps: 8
- after 3 steps: 11
- after 4 steps: 14
| Order | Result |
|---|---|
| add 3, then double | 10 |
| double, then add 3 | 7 |
Swap two steps and the answer changes; the loop is one step written once.