Step 3: Conditional Loops (While & Until)

Action:
  • Compare 'Repeat While' vs. 'Repeat Until'.

Speaker Notes:

"Sometimes, we don't know how many items there are. We use Repeat While to keep going as long as a condition is true (e.g., 'while the sensor sees an object'). Repeat Until is the opposite: it stops the moment something becomes true (e.g., 'until the emergency button is pressed'). These loops make your robot 'smart' and reactive."