Lesson Plan

Lesson Plan
Grade: Date: 17/01/2026
Subject: Computer Science
Lesson Topic: Justify why one loop structure may be better suited to solve a problem than the others
Learning Objective/s:
  • Describe the three primary loop structures (for, while, do…while) and their basic syntax.
  • Analyze a problem’s requirements to decide which loop structure is most appropriate.
  • Justify the chosen loop with clear, concise reasoning and relevant examples.
  • Apply the selected loop structure to implement a correct solution in code.
Materials Needed:
  • Projector and screen
  • Whiteboard and markers
  • Student laptops with a Java/C++ IDE installed
  • Printed handout of the loop comparison table
  • Sample code snippets (for, while, do…while)
  • Exit‑ticket cards or digital form
Introduction:
Begin with a quick poll: “When you bake a cake, which steps repeat and why?” Connect this to programming loops. Review that students already know basic loop syntax from previous lessons. Explain that today they will learn to choose the most readable and efficient loop for a given problem and be able to justify that choice.
Lesson Structure:
  1. Do‑Now (5'): Students list real‑world examples of repeated actions and share one.
  2. Mini‑lecture (10'): Review syntax and key characteristics of for, while, and do…while loops using projected slides.
  3. Guided analysis (12'): Present three problem scenarios; in pairs, decide which loop fits best and write a brief justification.
  4. Coding practice (15'): Students code the chosen loop for one scenario in their IDE; peers review for correctness and clarity.
  5. Whole‑class debrief (8'): Groups present their choices; teacher highlights alignment with the comparison table.
  6. Exit ticket (5'): Write the loop type you would use for a new prompt and one sentence explaining why.
Conclusion:
Summarize the criteria for selecting a loop: known iteration count, condition‑driven repetition, and the need for at least one execution. Collect exit tickets to gauge understanding, and assign a worksheet where students must justify loop choices for five additional problems for homework.