Skip to content
Computer Science · Grade 9

Active learning ideas

Introduction to Algorithms

Active learning works because algorithms live in the space between thought and action. When students physically act out instructions, sort objects, or debate routes, they convert abstract definitions into concrete understanding. These movement-based tasks let them test ideas, fail safely, and revise quickly, which builds lasting comprehension of precision and efficiency in problem-solving.

Ontario Curriculum ExpectationsCS.HS.AP.2CS.HS.CT.3
20–45 minPairs → Whole Class4 activities

Activity 01

Think-Pair-Share30 min · Pairs

Pair Swap: Sandwich Algorithms

Pairs write a step-by-step algorithm for making a peanut butter sandwich using pseudocode. They swap papers, follow the instructions exactly, and note any unclear steps or errors. Pairs then revise based on feedback and share one improvement with the class.

Compare and contrast different algorithms for solving the same problem.

Facilitation TipDuring Pair Swap: Sandwich Algorithms, give each pair identical ingredients but different instruction sets, one precise and one vague, to highlight how missing details break execution.

What to look forProvide students with two different sets of instructions for making a peanut butter and jelly sandwich. Ask them to write down which set of instructions they think is a better algorithm and explain why, referencing clarity and completeness.

UnderstandApplyAnalyzeSelf-AwarenessRelationship Skills
Generate Complete Lesson

Activity 02

Think-Pair-Share45 min · Small Groups

Small Group: Sorting Bead Challenge

Groups receive mixed beads and create two algorithms to sort them by color: one intuitive, one optimized. They test both on new sets, count steps, and graph efficiency. Discuss which performs best under time constraints.

Analyze the efficiency of a simple algorithm based on its number of steps.

Facilitation TipDuring Small Group: Sorting Bead Challenge, provide identical sets of beads but vary the group size to show how larger inputs require more efficient logic.

What to look forPresent students with a simple task, such as sorting three colored blocks (red, blue, green) from left to right. Ask them to write down the algorithm in pseudocode or numbered steps and then count the total number of actions (steps) required.

UnderstandApplyAnalyzeSelf-AwarenessRelationship Skills
Generate Complete Lesson

Activity 03

Think-Pair-Share25 min · Whole Class

Whole Class: Route Planning Debate

Display two algorithms for walking to school. Class analyzes steps for efficiency, votes on the best, and justifies with counts. Teacher facilitates by having volunteers act out each route.

Construct an algorithm to solve a specific, everyday task.

Facilitation TipDuring Whole Class: Route Planning Debate, select a daily commute example so students connect algorithms to their own lives.

What to look forPose the question: 'Can an algorithm have more than one correct output for the same input?' Facilitate a class discussion using examples like sorting numbers in ascending versus descending order, or finding the shortest path versus the scenic route.

UnderstandApplyAnalyzeSelf-AwarenessRelationship Skills
Generate Complete Lesson

Activity 04

Think-Pair-Share20 min · Individual

Individual: Daily Task Pseudocode

Students select a personal routine, like getting ready for school, and write an algorithm in pseudocode. They self-assess for definiteness and efficiency, then iterate once based on a checklist.

Compare and contrast different algorithms for solving the same problem.

Facilitation TipDuring Individual: Daily Task Pseudocode, require students to time their own actions to prove efficiency is measurable, not just theoretical.

What to look forProvide students with two different sets of instructions for making a peanut butter and jelly sandwich. Ask them to write down which set of instructions they think is a better algorithm and explain why, referencing clarity and completeness.

UnderstandApplyAnalyzeSelf-AwarenessRelationship Skills
Generate Complete Lesson

A few notes on teaching this unit

Start with the familiar and move to the formal. Teach algorithms by having students act out directions first, then map those actions to pseudocode. Avoid jumping straight to programming syntax; let the concept of unambiguous steps sink in through physical activity. Research shows that embodied cognition—moving and manipulating—strengthens understanding of abstract processes like sequencing and iteration. Also, use student errors as teachable moments: when instructions fail, pause to diagnose the ambiguity rather than fixing it for them.

Successful learning looks like students confidently identifying algorithm characteristics, critically evaluating step sequences, and revising vague instructions. They should articulate why fewer precise steps are better and recognize ambiguity when it appears. By the end, students can translate everyday tasks into numbered, unambiguous instructions and justify their choices with evidence from their work.


Watch Out for These Misconceptions

  • During Pair Swap: Sandwich Algorithms, watch for students who assume algorithms only belong to computers.

    Have each pair follow their peer’s vague instructions to make a sandwich, then debrief: ask how confusion arose and why precise wording matters for humans too.

  • During Small Group: Sorting Bead Challenge, watch for students who believe adding more steps improves the algorithm.

    Set a timer and have groups compare their step counts and total time to prove shorter, clearer steps work faster. Ask: 'How did extra steps slow you down?'

  • During Individual: Daily Task Pseudocode, watch for students who think any list of instructions qualifies as an algorithm.

    Collect student drafts and redistribute them anonymously. Have peers follow the instructions and flag vague terms, then revise together in small groups.


Methods used in this brief