➡️
Coding🧸 Ages 4-6Beginner 5 min read

Sequencing with Arrows

An early-years coding lesson on sequencing with arrows: use up, down, left and right arrows to guide a character step by step, learn why order matters, with a fun maze game and a mini quiz.

Key takeaways

  • Arrows tell a character which way to move
  • A sequence of arrows is followed in order, one step at a time
  • Changing the order changes where you end up
  • One wrong arrow can send you the wrong way

Arrows tell you which way

An arrow points one way. It tells you which way to go.

There are four special arrows in coding:

  • ⬆️ go up
  • ⬇️ go down
  • ⬅️ go left
  • ➡️ go right

Each arrow means take one step that way. Just one step!

Make a sequence of arrows

A sequence is a row of arrows, one after another.

Put arrows side by side, like this:

➡️ ➡️ ⬆️

Now read them in order, left to right:

  1. ➡️ Take one step right.
  2. ➡️ Take one more step right.
  3. ⬆️ Take one step up.

The character does each arrow one at a time, from the first to the last. It never skips ahead. It never reads them backwards.

A worked example: reach the star

Let's help a little robot 🤖 reach the star ⭐.

🤖 . . ⭐

The star is three steps to the right. So we need three right arrows:

➡️ ➡️ ➡️

Let's follow them slowly:

  1. ➡️ The robot moves to the first dot.
  2. ➡️ The robot moves to the second dot.
  3. ➡️ The robot lands on the star! ⭐

It worked! The robot reached the star because we picked the right arrows in the right order.

Order really matters

Now let's try a path that goes right and then up.

➡️ ⬆️

That means: one step right, then one step up.

But what if we flip the arrows around?

⬆️ ➡️

Now it means: one step up, then one step right. That is a different path! You end up in a different place.

This is why order matters so much. The same arrows in a different order take you somewhere new.

One wrong arrow

Watch out! If you pick one wrong arrow, the character goes the wrong way.

Say you wanted ➡️ but you picked ⬅️ by mistake. Now the character walks the wrong way and misses the star.

When that happens, we just look at our arrows, find the wrong one, and fix it. Fixing a mistake in your steps is a big part of coding. You can learn more about that in Debugging: Finding Mistakes.

Arrows are real coding

When you put arrows in order, you are doing real coding! You are giving a computer a clear plan of steps. This same idea is in Sequences: Putting Steps in Order, where steps go one after another from top to bottom.

Big robots and game characters move with sequences just like this. They follow their steps in order, one at a time.

Try it yourself

Here is a path. The cat 🐱 wants to reach the fish 🐟.

🐱 . .
. . .
. . 🐟

The fish is two steps right and two steps down.

Can you make the arrows? Try this sequence:

➡️ ➡️ ⬇️ ⬇️

Follow each arrow with your finger, one at a time. Two steps right, then two steps down. Did the cat reach the fish? 🎉

Now mix the arrows up. Put a ⬇️ first. Does the cat still reach the fish? See how the order changes everything!

Try making your own path on paper. Draw a start, draw a star, and write the arrows to get there. You are a coder now!

Quick quiz

Test yourself and earn XP

What does the ➡️ arrow tell you to do?

How does the character follow the arrows?

If you want to go up, which arrow do you pick?

Why does the order of the arrows matter?

FAQ

It means putting direction arrows in a row to plan a path. The character follows the arrows in order, one step at a time, so it ends up exactly where you planned.

Arrows are an easy first way to give a computer instructions. They teach order and direction, which are the same ideas used later in real coding.