Lesson 1 of 10

What Is an Algorithm? 🧩

🎯 Grades 3–5 ⏱ ~25 minutes 🟢 Beginner

What You'll Learn

  • What an algorithm is and why it matters
  • How computers follow step-by-step instructions
  • How to control the turtle with your first commands

Step-by-Step Instructions

An algorithm is a set of step-by-step instructions that solves a problem or completes a task. You use algorithms every day without knowing it!

Think about tying your shoes:

  1. Cross the laces
  2. Pull one under the other and tighten
  3. Make a loop with one lace
  4. Wrap the other around it
  5. Pull through and tighten

If you did step 3 before step 2, it wouldn't work. Order matters!

Fun Fact!

The word "algorithm" is over 1,000 years old. It comes from Al-Khwarizmi, a Persian mathematician whose books on math changed the world.

Computers Need Exact Instructions

Computers are incredibly fast — but they are not smart on their own. They do exactly what they are told, nothing more and nothing less.

If you tell the turtle to move forward 60 steps, it moves exactly 60 steps. If you forget to tell it to turn, it will never turn — even if turning would make more sense to you!

Clear, correct instructions are the most important skill in coding.

💡
Think About It

If you were a robot told to "make a sandwich," what questions would you need answered first? Where is the bread? What goes on it? Computers need that same level of detail.

Meet the Turtle 🐢

In this course you will give instructions to a turtle — a glowing triangle that moves around a canvas on your screen. The turtle understands these commands:

  • Move Forward — turtle travels forward by a number of steps you choose
  • Move Backward — turtle travels backward
  • Turn Left 90° — turtle rotates a quarter-turn to the left
  • Turn Right 90° — turtle rotates a quarter-turn to the right

The turtle starts in the center of the canvas, facing right. Add blocks to the program, then click Run to watch it go!

🎮 Try It — Control the Turtle!

Click the blocks on the left to add them to your program. Then press ▶ Run to watch the turtle execute your algorithm step by step.

Try to move the turtle to the right edge of the canvas. The canvas is 320 units wide — the turtle starts at the center (160 units in). How far does it need to go?

Quick Check

1. What is an algorithm?

AA type of computer chip
BA set of step-by-step instructions
CA programming language

2. Why does order matter in an algorithm?

AIt doesn't — computers figure it out
BOnly the last step matters
CWrong order gives wrong results

3. The turtle is facing right and you click Turn Left 90°. Now which way is it facing?

ARight
BUp
CDown
← Previous Your First Program →