Skip to content

Control Structures: Selection and IterationActivities & Teaching Strategies

Active learning works for control structures because students must physically trace, compare, and justify code choices to see how loops and conditionals shape program behavior. When students pair-program or trace puzzles, they confront misconceptions directly through execution and debugging, turning abstract concepts into concrete understanding.

Year 10Technologies4 activities20 min45 min

Learning Objectives

  1. 1Compare the execution time of a 'for' loop and a 'while' loop when processing a list of 1000 numbers.
  2. 2Design an algorithm that uses nested 'if-else' statements to determine the appropriate shipping cost based on weight, destination, and speed.
  3. 3Evaluate the necessity of a 'do-while' loop for a program that repeatedly prompts a user for input until valid data is entered.
  4. 4Create a pseudocode representation of a program that iterates through a collection of student grades, applying different conditional logic for A, B, C, D, and F grades.
  5. 5Justify the selection of an iterative control structure over a recursive one for a task involving sequential data processing.

Want a complete lesson plan with these objectives? Generate a Mission

Pair Programming: Loop Efficiency Race

Pairs write a program to sum numbers from 1 to 100 using both for and while loops, then time each with a stopwatch. They modify inputs to test efficiency and discuss results. Share findings with the class via a shared document.

Prepare & details

Compare the efficiency of a 'for' loop versus a 'while' loop for a specific task.

Facilitation Tip: During Loop Efficiency Race, remind students to print variables at each iteration to visualize when and why one loop finishes faster than the other.

Setup: Groups at tables with problem materials

Materials: Problem packet, Role cards (facilitator, recorder, timekeeper, reporter), Problem-solving protocol sheet, Solution evaluation rubric

ApplyAnalyzeEvaluateCreateRelationship SkillsDecision-MakingSelf-Management
45 min·Small Groups

Small Groups: Nested Conditional Challenge

Groups design a decision tree for a quiz game with nested if-else handling score ranges, retries, and categories. Test on classmates and iterate based on edge cases. Present logic flowcharts.

Prepare & details

Design a program that uses nested conditional logic to handle multiple scenarios.

Facilitation Tip: In Nested Conditional Challenge, prohibit single if statements so groups must structure decisions hierarchically, revealing the necessity of nesting.

Setup: Groups at tables with problem materials

Materials: Problem packet, Role cards (facilitator, recorder, timekeeper, reporter), Problem-solving protocol sheet, Solution evaluation rubric

ApplyAnalyzeEvaluateCreateRelationship SkillsDecision-MakingSelf-Management
25 min·Whole Class

Whole Class: Do-While Menu Simulator

Project a menu program skeleton using do-while. Class votes on options, predicts outputs, then codes and runs live. Debug collectively when inputs cause issues.

Prepare & details

Justify the choice of a 'do-while' loop over a 'while' loop in certain situations.

Facilitation Tip: In Do-While Menu Simulator, require students to write the condition before the first prompt so they experience how do-while guarantees at least one execution.

Setup: Groups at tables with problem materials

Materials: Problem packet, Role cards (facilitator, recorder, timekeeper, reporter), Problem-solving protocol sheet, Solution evaluation rubric

ApplyAnalyzeEvaluateCreateRelationship SkillsDecision-MakingSelf-Management
20 min·Individual

Individual: Loop Tracing Puzzle

Students receive printed code snippets with loops and predict step-by-step outputs on worksheets. Code and verify digitally, noting discrepancies.

Prepare & details

Compare the efficiency of a 'for' loop versus a 'while' loop for a specific task.

Setup: Groups at tables with problem materials

Materials: Problem packet, Role cards (facilitator, recorder, timekeeper, reporter), Problem-solving protocol sheet, Solution evaluation rubric

ApplyAnalyzeEvaluateCreateRelationship SkillsDecision-MakingSelf-Management

Teaching This Topic

Teach control structures by starting with real-world analogies students can act out, like waiting in line for an event that happens only if a condition is met. Avoid teaching loops in isolation; always pair them with decision points so students see how selection and iteration interact. Research shows tracing code by hand before running it reduces runtime errors and builds deeper understanding of flow control.

What to Expect

Successful learning looks like students confidently selecting the right loop or conditional for a task, explaining their choices in terms of efficiency or logic, and debugging infinite loops or misplaced updates without prompting. Clear justifications and correct pseudocode become routine outputs.

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
Generate a Mission

Watch Out for These Misconceptions

Common MisconceptionDuring Loop Efficiency Race, watch for students who assume the loop with more lines of code runs slower without tracing variables.

What to Teach Instead

Have them insert print statements inside each loop to output the counter value and condition status, forcing them to see how often the loop body executes and why.

Common MisconceptionDuring Nested Conditional Challenge, watch for students flattening nested conditionals into long chains of if-else statements.

What to Teach Instead

Ask groups to draw their logic as a flowchart first, then convert it directly to code, ensuring nesting reflects the hierarchy they designed.

Common MisconceptionDuring Do-While Menu Simulator, watch for students writing while loops instead of do-while because they forget the initial execution.

What to Teach Instead

Require them to write the menu prompt before the loop header, then step through the first iteration manually to confirm the prompt appears exactly once.

Assessment Ideas

Quick Check

After Loop Efficiency Race, present students with two pseudocode snippets performing the same task—one using a for loop and one using a while loop—and ask them to circle the more efficient version and write one sentence explaining their choice based on the number of iterations.

Exit Ticket

After Do-While Menu Simulator, give students the password scenario and ask them to write pseudocode for both a while and a do-while loop, then check their justification for choosing one over the other using the simulator’s structure as a reference.

Discussion Prompt

During Nested Conditional Challenge, facilitate a class discussion asking groups to share how they structured their nested conditionals for a menu with three options and one invalid choice, then compare approaches to identify patterns in clarity and efficiency.

Extensions & Scaffolding

  • Ask students to convert their Loop Efficiency Race solution into a version using a different loop type and measure the difference in execution steps.
  • Provide scaffolding by giving students a partially completed flowchart for the Nested Conditional Challenge, with key decision diamonds left blank to fill in.
  • Invite students to research and present one loop optimization technique from programming history, linking it to efficiency trade-offs they observed.

Key Vocabulary

Conditional StatementA programming structure that executes different code blocks based on whether a specified condition is true or false. Examples include 'if', 'else if', and 'else'.
IterationThe process of repeating a set of instructions or code block multiple times. This is commonly achieved using loops like 'for', 'while', and 'do-while'.
For LoopA loop structure that executes a block of code a predetermined number of times, often used when the number of iterations is known in advance.
While LoopA loop structure that executes a block of code as long as a specified condition remains true. The number of iterations may not be known beforehand.
Do-While LoopA loop structure that executes a block of code at least once, and then continues to repeat as long as a specified condition remains true.

Ready to teach Control Structures: Selection and Iteration?

Generate a full mission with everything you need

Generate a Mission