Introduction to Coding and Programming
Computers can help us with a wide range of problems, but in order for this to happen, we need to undertake a 2-step process:
Formulate the precise sequence of steps needed to solve the problem. This is known as an algorithm.
Give the algorithm to a computer in a language it understands, so that it can perform the task(s) we give it. This is known as coding.
The process of creating algorithms and turning them into code is called programming.
Natural language isn’t used for coding because it’s too imprecise. Here’s a joke that illustrates this point:
A programmer is going to the supermarket and is told: “Buy a pint of milk, and if there are eggs, buy a dozen.” The programmer goes to the supermarket, buys everything, and drives back to his house. Upon arrival, he is angrily asked “Why did you get 12 pints of milk?” The programmer says, “Because they had eggs!”
In the next activity, you’re going to code an algorithm to tell a ‘Knock Knock’ joke.