Learning Objective:
To create an algorithm for brushing your teeth.By MM Year 5O @TMPS |
The word “algorithm” may not seem relevant to us on a daily basis, but the truth is that algorithms are all around us, governing everything from the technology we use to the decisions that we make every day. For example:
An Algorithm for Cleaning Your Teeth
What Is an Algorithm?
An algorithm is a detailed step-by-step instruction set or formula for solving a problem or completing a task. In computing, programmers write algorithms that instruct the computer how to perform a task.
When you think of an algorithm in the most general way (not just in regards to computing), algorithms are everywhere. A recipe for making food is an algorithm, the method you use to solve addition or long division problems is an algorithm, and the process of folding a shirt or a pair of pants is an algorithm. Even your morning routine could be considered an algorithm! In fact, here’s what your morning might look like written out as an algorithm:
You Can Write Your Own Algorithms!
See if you can write out your morning algorithm or the algorithm for an even simpler task, like brushing your teeth. Without knowing it, you’ll be exploring important computational concepts like repetition (brush bottom left teeth five times), sequencing (put toothpaste on brush and then brush teeth), and conditional logic (if the top teeth are clean, move to the bottom teeth).
Try to be as specific with the instructions as possible. Computers don’t understand your intentions, so if you don’t specify that you need to get out the toothpaste first, you’ll end up with no paste to clean your teeth!
Once you have written your instructions program a friend to act out your algorithm. Notice what happens when the algorithm isn't clear!
Extension Task
Can you clean the man's teeth? Also have a look inside the game and check out the algorithms used to create the game.
An algorithm is a detailed step-by-step instruction set or formula for solving a problem or completing a task. In computing, programmers write algorithms that instruct the computer how to perform a task.
When you think of an algorithm in the most general way (not just in regards to computing), algorithms are everywhere. A recipe for making food is an algorithm, the method you use to solve addition or long division problems is an algorithm, and the process of folding a shirt or a pair of pants is an algorithm. Even your morning routine could be considered an algorithm! In fact, here’s what your morning might look like written out as an algorithm:
You Can Write Your Own Algorithms!
See if you can write out your morning algorithm or the algorithm for an even simpler task, like brushing your teeth. Without knowing it, you’ll be exploring important computational concepts like repetition (brush bottom left teeth five times), sequencing (put toothpaste on brush and then brush teeth), and conditional logic (if the top teeth are clean, move to the bottom teeth).
Try to be as specific with the instructions as possible. Computers don’t understand your intentions, so if you don’t specify that you need to get out the toothpaste first, you’ll end up with no paste to clean your teeth!
Once you have written your instructions program a friend to act out your algorithm. Notice what happens when the algorithm isn't clear!
Extension Task
Can you clean the man's teeth? Also have a look inside the game and check out the algorithms used to create the game.