Algorithm and Sequencing
• Code - to write instructions for a computer.
• Program - An algorithm that has been coded into something that can be run by a
machine.
• Event - An action that causes something to happen.
• Algorithm - An algorithm is a plan, a set of step-by-step instructions to solve a
problem.
What is an algorithm?
Algorithm
A list of steps to finish a task.
Algorithms need to have their steps in the right order.
Algorithms need to have their steps in the right order.
Think about an algorithm for brushing teeth in the morning.
A very simple algorithm for brushing teeth might consist of these steps:
1. put toothpaste on toothbrush
2. use toothbrush to clean teeth
3. rinse toothbrush
Steps 1 and 2 are in the wrong sequence the teeth wouldn’t get cleaned with the toothpaste,
and the toothpaste would be wasted.
A human would realize they had forgotten to add toothpaste at the start of the process, but
a computer would not know that anything was wrong.
When you write an algorithm the order of the instructions is very important.
1 - Sequencing
Sequencing
Putting commands in correct order so computers can read the commands.
Sequencing is the specific order in which instructions are performed in an algorithm.
Making a Sandwich (Algorithm)
Activity
Make Fruit Juice
or
Make a cup of coffee
2 - https://youtu.be/CvSOaYi89B4