Sequencing and Algorithms
Lesson preview: the Mini Lesson and Vocabulary are open to everyone. Guided practice, exercises, the parent checklist and the printable PDF worksheet come with full access (free 7-day trial or membership).
Learning Objectives
- 1Define an algorithm as a clear, ordered list of steps that solves a task
- 2Order a set of mixed-up steps so the algorithm runs correctly
- 3Match common algorithm steps with the action each one performs
- 4Explain why the order of steps matters in any algorithm
Mini Lesson
An algorithm is a clear, ordered list of steps that gets a job done. Recipes are algorithms. Routines for getting ready in the morning are algorithms. The instructions a computer follows are algorithms too. The two things that make an algorithm work are: every step is clear, and the steps are in the right order.
What Is Sequencing?
Sequencing means putting steps in the correct order. If you tell a computer to "pour the milk" before "get a cup," the program will fail — there is nowhere for the milk to go. Computers do exactly what you say, in the order you say it. So getting the order right is half the work of programming.
A Simple Algorithm: Make Toast
- Take a slice of bread out of the bag.
- Put the slice into the toaster.
- Press the lever down to start toasting.
- Wait for the toaster to pop the bread back up.
- Take the toast out and put it on a plate.
Each step is short and clear. The steps are in the right order. If you swap step 2 and step 5, the algorithm breaks — you cannot toast bread that is already on a plate.
Common Algorithm Building Blocks
- Input — get information into the program (a number, a word, a click).
- Process — do something with that information (calculate, compare, change it).
- Output — show the result on the screen, save it, or send it somewhere.
- Decision — branch the path based on a condition (if X then A, else B).
- Loop — repeat a step (or block of steps) until a condition is met.
- Stop — end the algorithm when the task is complete.
Why Order Matters
A computer does NOT guess your meaning. It runs steps top to bottom, one after the other. So step 3 cannot use a value that step 5 will create later. Whenever you write or read code, ask: "Does this step have everything it needs from the steps before it?" If yes, the order is correct.
Flowcharts: Drawing the Order
A flowchart is a picture of an algorithm. Boxes show steps. Arrows show the order. A diamond shows a decision (a yes/no question). Most flowcharts begin with a Start box and end with a Stop box. Drawing a flowchart before you write code helps you spot missing steps and wrong order before they become bugs.
Tip: when you debug an algorithm, run through it step by step on paper. Pretend you are the computer and you only know what each step says. The first step where you get stuck is the bug.
Unlock the full HSEA system for 7 days.
Add your first kid profile and your 7 days start: every lesson in every grade, saved progress for each child. Nothing to set up, no card required, nothing to cancel.
- ✓ All 1,680 lessons, Grades 1–6, every subject
- ✓ Profiles + saved progress for every kid
- ✓ Printable lessons with answer key