FossBot Educators Hub- Sustainability

Troubleshooting loops in Module 6: "Repeat While" vs. "Repeat Until"

Troubleshooting loops in Module 6: "Repeat While" vs. "Repeat Until"

by user user -
Number of replies: 0

Greetings! In the "Light control with light sensor" module, students use the FOSSBot's light sensor to guide the robot's behavior. A key learning outcome is distinguishing between different algorithmic repetition structures. Specifically, they learn that "Repeat While" runs as long as the condition is true, whereas "Repeat Until" runs as long as the condition is false. I have noticed my 13-14 year olds often struggle with the logic of stopping when a condition becomes true. Does anyone have a good real-world analogy to help them grasp this before they program the conditional logic for the LED colors?