Pip
Lesson 6 of 12

What is an algorithm?

4–6 min+100 XP
Grace and Pip in lesson 6: What is an algorithm?

Your mission

A robot must deliver a parcel to Door Six, and it only does exactly what it is told. Write precise steps, find the bug and discover how algorithms differ from AI.

Power-ups

  • Exact stepsAn algorithm is a list of precise steps, in order. Forward 3, turn right, forward 2.
  • BugsA wrong step (turn left instead of right) is a bug. Trace it, then fix it.
  • Algorithm vs AIAn algorithm follows the rules we write. AI learns patterns from examples.

Your turnTry it yourself

Quick checkThree questions

1What is an algorithm?

Like a recipe a computer can follow.

2The robot turned the wrong way. What is that?

Find the step and fix it.

3Does a simple algorithm learn by itself?

That's the big difference from AI.

Off-screen challenge: Jam sandwich challenge

Write exact steps to make a jam sandwich. A grown-up follows them exactly as written. Giggle at the bugs!

Last time: AI mistakes. Next time: let's code!