Intro to Coding with Blocks
Lesson 1 of 4 5 min +35 XP

Sequences & Loops

Tell the computer what to do, in order.

What you'll learn

  • Understand that order matters
  • Recognize a loop
  • Predict block output
The peanut-butter sandwich recipe

Tell a robot to make a sandwich and order matters: bread first, then peanut butter, then jam — swap the steps and you get a mess. A program is a recipe run in exact sequence, and a loop is saying 'spread ten times' without writing it ten times.

Step by step

A program is a list of steps the computer follows in order, top to bottom. If you swap the steps, you get a different result!

Loops repeat

A loop block runs the steps inside it again and again, so you don't have to copy them.

Knowledge Check

+10 XP / correct

1. In a program, the steps run…

2. A loop is useful because it…