Lesson Plan

Lesson Plan
Grade: Date: 17/01/2026
Subject: Computer Science
Lesson Topic: Write pseudocode for 1D and 2D arrays
Learning Objective/s:
  • Describe the structure and zero‑based indexing of 1‑D and 2‑D arrays.
  • Write correct pseudocode to declare, initialise, and access elements in a 1‑D array.
  • Write correct pseudocode to declare, initialise, and manipulate a 2‑D array, including loops for sums or averages.
  • Identify and avoid common indexing mistakes such as off‑by‑one errors and row/column confusion.
Materials Needed:
  • Projector or interactive whiteboard
  • Printed handout of pseudocode examples
  • Whiteboard and markers
  • Student laptops with a simple IDE or text editor
  • Worksheet with practice questions
  • Visual diagram of a 3×4 two‑dimensional array
Introduction:
Begin with a quick recall of how arrays store collections of data and why indexing matters. Prompt students to share everyday examples of lists or tables they encounter. Explain that today they will translate these ideas into clear pseudocode for both 1‑D and 2‑D arrays, and success will be measured by correctly writing and tracing the code.
Lesson Structure:
  1. Do‑Now (5'): Students list differences between 1‑D and 2‑D arrays on sticky notes.
  2. Direct Instruction (10'): Teacher reviews key concepts, shows a visual diagram, and emphasises zero‑based indexing.
  3. Guided Practice – 1‑D Array (12'): Walk through declaration, initialisation, assignment, and sum calculation, checking understanding with questioning.
  4. Guided Practice – 2‑D Array (15'): Demonstrate declaration, filling, element access, and row‑average loop; students predict outputs.
  5. Independent Practice (10'): Students complete worksheet tasks – max in a 1‑D array, transpose a 3×3 matrix, sum all elements of a 2‑D array.
  6. Check for Understanding (5'): Quick exit ticket where each student writes one line of pseudocode to debug a given snippet.
Conclusion:
Recap how proper indexing and loop bounds enable correct array operations and highlight the common pitfalls to watch for. Collect exit tickets that capture one tip for avoiding off‑by‑one errors. For homework, assign students to write pseudocode that merges two 1‑D arrays into a sorted 1‑D array.