Lite / Discovering How the World Works / Week 23
Week 23: Repetition and loops
This week you will
- Trace a repeat-N-times loop and predict its final value.
- Explain how a repeat-until loop knows when to stop.
- Recognise the forever loop inside every robot controller.
Lessons
- Repeat N times · about 25 min
A robot must draw a square. You could write eight instructions. Could you write it in three? - Repeat until: loops that decide when to stop · about 25 min
You don't know how many spoons of sugar a cup of tea needs until you taste it. How does a machine 'taste'? - The forever loop inside every robot · about 25 min
Infinite loops are a bug, right? So why does every traffic light controller run one on purpose?