0

If this, then that

  1. if

    We make choices

    We make choices every day. The word if starts a choice. If it is raining, we take an umbrella.

  2. The bell rings
    if part
    Line up
    do part

    The if part and the do part

    A rule has two parts. The if part is what we check. The do part is what we do. If the bell rings, line up.

  3. Raining: take it
    Not raining: leave it

    When it is not true

    Sometimes the if part is not true. Then we skip the do part. It is not raining today. So we leave the umbrella at home.

  4. else

    Else means if not

    Else tells us what to do instead. If it is sunny, play outside. Else, read a book. It is raining, so we read a book.

  5. if the way right is blocked
    move down
    else
    move right

    The robot follows rules too

    Robots use rules to choose. This robot asks: is the way right blocked? A rock is there, so it goes down. Press Run to watch.

For parents

Goal: Your child learns that a rule has an if part and a do part, and that else means if not, do this instead.

  • Make rules at home together, like: if your plate is empty, you may leave the table.
  • Ask: which part is the if part? Which part is the do part?
  • In the labs, your child sorts rain and sun rules, then gives the robot its own if rule. Ask what the rule says before pressing Run.

Away from the screen: Play a game: if I clap, you jump. Else, stand still. Then let your child make up a rule for you to follow.

Coding · Making Choices
Back to top