Conditions for kids: MRT Station

Wait for the fare gates and train doors. Timing is everything.

Free · no sign-up · ages 6–12 · works on Chromebooks and iPads

What are conditions?

A condition lets a program make a decision: if something is true, do one thing; otherwise (else), do something different. Conditions are how programs react to the world. A game checks if you pressed jump, and a traffic light checks if a car is waiting.

At the MRT station, the fare gates and train doors open and shut on a timer. Your robot can't walk through a shut gate, and it can't board while the doors are closed. You could count the exact number of waits, but then your program only works for one timetable. Using "if the gate is shut, wait, else move" gives you a program that works whenever the robot arrives.

This world also brings in "repeat until finished", a loop that keeps going until the job is done instead of a fixed number of times. Putting a condition inside that loop is one of the most common patterns in real code. Programs check, act, and check again.

Ready to Start Building?

Book a free 45-minute trial class. No commitment, no credit card — just great learning.