What is an algorithm?
An algorithm is a sequence of instructions or a set of rules that are followed to complete a task. This task can be anything, so long as you can give clear instructions for it.
For example, to make yourself a drink you have to follow a sequence of steps in the right order. If you do something in the wrong order you might end up making a mess.
When you write an algorithm you need to include precise, step-by-step instructions.
Here are the instructions for making a smoothie:
Add fruit to the blender.
Add milk to the blender.
Put the lid on the blender.
Switch the blender on.
Imagine if we missed out one of the steps or reversed the order. We could end up switching on the blender with nothing in it. Or there could just be milk in the blender and no fruit.
That wouldn't make a very tasty smoothie, would it? In fact, it wouldn't make a smoothie at all!
Speaking a computer's language
Computers won’t understand your algorithm as they use a different language.
It will need to be translated into code which the computer will then follow to complete a task.
This code is written in a programming language. There are many different types of programming languages.
Some that you may come across are Logo, Scratch, Blockly, Python and Kodu. Each of these languages are suited to different things.
In this video Nate follows an algorithm he has written to carry out a science experiment.