What is a program?

A program is simply a set of instructions to perform a particular task.

We use simple programs every day, probably without even realising it.  Think about the things you do in the morning.  Here's an example, though yours may well be different:

Making Toast

  1. Get bread
  2. Put in toaster
  3. Switch on toaster
  4. Get plate
  5. Get knife
  6. Get butter
  7. When toast ready take out
  8. Put toast on plate
  9. Put butter on knife
  10. Spread butter on toast
  11. Eat toast
  12. End
Notice that the instructions are in order, that is they follow a logical sequence of events.  For example you cannot put butter onto the knife (9) if you have not put out the butter (6).

You will also see that every line is numbered, so it is easier to follow the sequence of events.

This is a simple example, but the principles are the same for more complex programs.