How to Write Simple Algorithms

Algorithms surround us every day, from simple ones that drive traffic lights to the more complex instructions for home security systems. An algorithm is a set of instructions that governs how something works. One of the first lessons in many computer science courses is creating an algorithm that will make a peanut butter and jelly sandwich; what is usually a simple task is actually quite complex when broken down. Algorithms are the basis for pseudocode, and they can help to simplify complex tasks by organizing them into smaller, simpler steps.

...
Computers use algorithms in the form of applications to perform different tasks.

Step

Define the goal of your algorithm. If you can't think of your own, use "make a peanut butter and jelly sandwich" as an example.

Step

Write each step needed to complete the procedure in plain English, with each step on a separate line.

Step

Break down each step. If there are any concepts that require previous knowledge, explain them in terms that someone with no prior experience could understand. A good algorithm is clear without being overly verbose.