May 12, 2025

Dear learner,

In this lesson, you will:

  • Find out what an algorithm is (it’s like a set of instructions or rules!).
  • Practice making your own algorithm (your own set of steps!).

Get ready to learn how to give clear instructions!

WHAT IS AN ALGORITHM?

Many kids in rich homes grow up enjoying peanut butter and jelly sandwiches. Watch as Johnna and Evan guide their dad, Josh, through the steps of making one.

In the video, Josh the dad only follows instructions if they are given in clear, step-by-step commands. Like a computer, he needs directions that are specific and precise.

Johnna and Evan tried to give him an algorithm to make a sandwich, but the outcome was a bit unpredictable.

An algorithm is a set of step-by-step instructions. In order to make a computer do something, you need to give it an algorithm.

In ICT clubs, you will learn how to write algorithms to make a mobile app!

Let’s practice writing explicit instructions for someone to follow.

Mentor Tip

Best practices: Encourage students to break down the task into small steps. Keep them excited by reminding them that this is the first step to coding.

Optional activity : Do the Peanut Butter and Jam activity with your students!

More background: European schools experimented with ways to teach computer science to young kids (4-5 years old) but it’s a really fun activity to do with anyone!

They wanted to illustrate that computers are not smart. They are just very fast (and dumb) machines that do whatever we program to tell them to do. They did this by acting like computers and the kids “programmed” the computers/teacher to make a PB&J. This is quite hilarious if done correctly because the goal is to take the commands as literally as possible. If the students first step is “Spread the peanut butter on the bread” then teachers/computers will not do the obvious things first they will do the literal thing which would probably be to spread peanut butter all over the ENTIRE loaf of bread (since the student didn’t specify just one piece of toast).

There is an example video here with more instructions and information. 

Guiding Questions : Are there any other games that need an algorithm to play them? Think about any of those Diner games where you have to make people’s orders. First you cook the meat, chop the veggies and then put it all together on a plate! Like Overcooked! Are there any other real-life games that use an algorithm? What about a rubik’s cube? You repeat certain patterns until the squares are moved where you want them, that’s an algorithm!

ACTIVITY1: WRITE AN ALGORITHM

There are two options here for an algorithm activity. You can do one or the other, or both. The first activity is a physical one (dancing!) so a good option if your team is meeting in person. If you are meeting virtually, you might want to try the second option, a drawing activity. Click on either activity to read instructions.

Instructions.

DANCING ALGORITHM

  1. One team member must volunteer to be the dancer and leave the room.
  2. Other team members watch the video a few times.
  3. Then, the non-dancer team members write down an algorithm for the dancer to follow.
  4. They must then “teach” the dancer the moves, using only the steps of their algorithm. 
  5. Have the dancer dance along with the video and see how close you got!

REVIEW OF KEY TERMS

Algorithm – step by step instructions that explain how to do something

ADDITIONAL RESOURCES

If you want a little more information about what an algorithm is, this is a good video to watch.

Leave a Reply

Your email address will not be published. Required fields are marked *