Sequence: The Order of ExecutionActivities & Teaching Strategies
Active learning works well for sequence because students often assume code runs intuitively, like human conversation. By physically acting out instructions or debugging real snippets, they confront the rigid logic of computers firsthand, building stronger mental models.
Learning Objectives
- 1Analyze how changing the order of commands in a simple algorithm alters its final output.
- 2Explain the necessity of sequential instruction execution for achieving predictable program results.
- 3Construct a visual representation, such as a flowchart, demonstrating the sequential flow of instructions.
- 4Identify specific points in a given program where instruction order is critical to its function.
Want a complete lesson plan with these objectives? Generate a Mission →
Role Play: The Human Compiler
One student is the 'CPU' and another is the 'Programmer'. The Programmer gives instructions containing loops and if-statements (e.g., 'Take 3 steps, IF you see a chair, sit down, ELSE clap'). The CPU must follow them exactly.
Prepare & details
Explain how the order of instructions changes the outcome in a concurrent processing environment.
Facilitation Tip: During the Human Compiler activity, stand back and let students struggle slightly with the physical limits of their own bodies to highlight why computers cannot rearrange instructions.
Setup: Open space or rearranged desks for scenario staging
Materials: Character cards with backstory and goals, Scenario briefing sheet
Inquiry Circle: Loop Deconstruction
Groups are given snippets of code with intentional errors in the iteration (like infinite loops or 'off-by-one' errors). They must work together to trace the variables and fix the logic so the loop ends correctly.
Prepare & details
Analyze the importance of sequential execution for predictable program behavior.
Facilitation Tip: For Loop Deconstruction, assign small groups specific loops to diagram before they present—this forces them to notice the difference between count-controlled and condition-controlled loops.
Setup: Groups at tables with access to source materials
Materials: Source material collection, Inquiry cycle worksheet, Question generation protocol, Findings presentation template
Think-Pair-Share: Selection in Gaming
Students think of their favourite video game and identify three 'selection' moments (e.g., if health < 10, play heart sound). They pair up to write the pseudo-code for these moments and share them with the class.
Prepare & details
Construct a simple program demonstrating the impact of instruction order.
Facilitation Tip: During Selection in Gaming, circulate and listen for students to connect their personal gaming experiences to the if-statements they see in code.
Setup: Standard classroom seating; students turn to a neighbor
Materials: Discussion prompt (projected or printed), Optional: recording sheet for pairs
Teaching This Topic
Teachers approach this topic by starting with the concrete and moving to the abstract: have students experience sequence as a physical process before they analyze code snippets. Avoid rushing to definitions; instead, let students articulate why order matters through mistakes and corrections. Research shows that students grasp sequence best when they debug their own flawed instructions rather than just reading about them.
What to Expect
Successful learning looks like students consistently recognizing that order matters, choosing the right loop structure for a task, and explaining why swapping two lines of code changes the outcome without prompting.
These activities are a starting point. A full mission is the experience.
- Complete facilitation script with teacher dialogue
- Printable student materials, ready for class
- Differentiation strategies for every learner
Watch Out for These Misconceptions
Common MisconceptionDuring the Human Compiler activity, watch for students assuming that the human body can skip steps or rearrange actions without consequence.
What to Teach Instead
After the activity, ask students to reflect on which steps felt impossible to skip and connect this to why computers cannot reorder instructions.
Common MisconceptionDuring Loop Deconstruction, watch for students treating all loops as interchangeable because they see similar syntax.
What to Teach Instead
Have students annotate the loop headers with whether the end condition is known in advance (for) or unknown (while), using the loops they deconstructed.
Assessment Ideas
After the Human Compiler activity, present two short code snippets where only the order of two lines differs. Ask students to predict the outputs and explain the difference in 2-3 sentences.
After the tea-making task, collect student lists and have them swap with a partner. Each student must identify one step that, if moved, would change the outcome, and explain why.
During the robot drawing square discussion, ask students to explain what happens if the pen lift command is placed before the move command, and call on three volunteers to share their reasoning.
Extensions & Scaffolding
- Challenge: Ask students to modify the tea-making steps so the order still produces tea but feels unnatural, then compare with a partner.
- Scaffolding: Provide strips with pre-written steps for making toast and have students physically reorder them before coding the sequence.
- Deeper exploration: Introduce nested loops by having students plan the steps for a robot that draws a 3x3 grid of squares, including pen lifts and moves.
Key Vocabulary
| Sequence | The order in which instructions are executed by a computer. Each instruction is performed one after another. |
| Algorithm | A set of step-by-step instructions or rules designed to perform a specific task or solve a particular problem. |
| Execution | The process of carrying out or performing a set of instructions within a computer program. |
| Control Flow | The order in which individual statements, instructions, or function calls of a program are executed or evaluated. |
Suggested Methodologies
More in The Art of Programming
Selection: Conditional Logic (If/Else)
Implementing 'if', 'else if', and 'else' statements to control program flow.
2 methodologies
Selection: Case Statements
Using case statements (or switch statements) for multi-way branching.
2 methodologies
Iteration: Fixed Loops (For)
Using 'for' loops to repeat a block of code a predetermined number of times.
2 methodologies
Iteration: Conditional Loops (While)
Using 'while' loops to repeat a block of code until a condition is met.
2 methodologies
Variables and Constants
Working with variables and constants to store and manipulate information.
2 methodologies
Ready to teach Sequence: The Order of Execution?
Generate a full mission with everything you need
Generate a Mission