A programming algorithm is a computer procedure that is a lot like a recipe. Through a series of precise steps an algorithm tells your computer precisely what steps to take to solve a problem or reach a goal. In this module students will learn how to write their own algorithms.
- A set of very specific steps to perform an action or solve a problem. The action could be anything from calculating or processing data, or reasoning through a task.
In this module students will learn what an algorithm is, where they exist in everyday life, and how to create their own.
This module can support curriculum expectations in both Mathematics and Computer Studies.
- Algorithms are all around us and are used in everything we do. They are simply a set of rules to accomplish a goal. Can anyone think of an algorithm they use in everyday life?
- Non-technology algorithms examples could include a recipe for cooking, directions to a friend’s house, instructions on how to build an Igloo.
- Pencil/pen or whiteboard marker
- Paper or whiteboard
Draw a Smiley Face
The purpose of this game is to illustrate why the commands given to a computer needs to be clear and specific in order to achieve the desired outcome.
In this game students will explain to their teacher (or another student) how to draw a smiley face on the board or a piece of paper. Of course we all know, intellectually, what a smiley face looks like, but the teacher is going to pretend to be a computer, which only responds to instructions literally, and does not understand intention. With a sense of humour and playfulness, this will be a fun way of showing that computers only do exactly what they are told, no more, no less.
- If several students offer instructions at the same time, the “computer” (teacher) could pretend to ‘overload’ or malfunction, as a way of illustrating that students need to establish a way of delivering one instruction at a time.Let’s say students start with an instruction such as “draw a circle”. But the teacher is facing away from the whiteboard, so the teacher just draws a circle in the air, since the students haven’t instructed the computer where to put the circle, or how big they want it, etc.
- This will point out that they’re missing some steps; they need to specify the computer to turn around, walk forward, etc.
- At this point the teacher can explain the difference between giving instructions to a human versus a computer: with humans, we can rely on certain assumptions and common knowledge that computers don’t necessarily understand. Computers need to be programmed using concise instructions in a language they understand.
- The instructor continues to follow their instructions exactly as they are given and – probably – failing to draw the face as the students are intending. For instance, students may neglect to tell the computer to remove the marker cap, or say “draw two dots inside the circle” without specifying where, etc.
- In the end, after some trial and error, they will have established a clear algorithm for the task.
- From here we can segue into an introduction to Robot Turtles, and how the instruction cards build and combine to create algorithms.
Teachers can repurpose this same idea to have students explain anything to them. Do it with a physical game that many people already know the rules to such as Octopus or Tag. Something as simple as ‘walking from point A to point B’ can be quite humorous with a representation of how a computer would interpret those instructions.
Computers are not inherently intelligent; they are only as smart as we make them. It is empowering for students to learn that a computer is a tool to control. And knowing how to create algorithms is a key step in learning how to harness that power.
- Slate – What’s the Deal With Algorithms?
- Slate – Your Algorithms Cheat Sheet
- Bright – Don’t Just Teach Kids How to Code, Teach Them Algorithms, Too
- YouTube Video – What’s an algorithm?
- Code.org – Real-life Algorithms: Plant a Seed
- Code.org – Real-life Algorithms: Paper Planes
Share your Feedback!
Could you please spare some time to fill out our survey? This will allow us to better understand the types of content you are interested in so we can create more resources like this in the future.