Lesson Plan

Lesson Plan
Grade: Date: 17/01/2026
Subject: Computer Science
Lesson Topic: Show understanding of why files are needed
Learning Objective/s:
  • Describe why files are required for data persistence beyond program execution.
  • Explain how files enable handling of data sets larger than available RAM.
  • Compare variables and files in terms of lifetime, capacity, and accessibility.
  • Apply the concept by outlining a simple file‑based student record workflow.
  • Evaluate the role of files in data sharing and backup strategies.
Materials Needed:
  • Projector or interactive whiteboard
  • Slides summarising key points
  • Sample student‑record text file (students.txt)
  • Laptop computers with a simple IDE (e.g., Python IDLE)
  • Worksheet with comparison table and short exercises
  • Whiteboard and markers
Introduction:
Begin with a quick question: Where does a program keep information after it stops running? Review that variables exist only in RAM and disappear when the program ends. Explain that today’s success criteria are to identify at least three reasons files are essential and to illustrate a real‑world scenario using a file.
Lesson Structure:
  1. Do‑now (5'): Students write on sticky notes where they think program data could be stored after exit; share briefly.
  2. Mini‑lecture (10'): Present definition of a file and the six key reasons, using slides and a flowchart diagram.
  3. Comparison activity (10'): In pairs, fill a comparison table (variables vs files) on the worksheet; teacher checks understanding.
  4. Demonstration (10'): Live coding of reading and writing a simple students.txt file in Python, highlighting persistence and data sharing.
  5. Guided practice (15'): Students modify the sample program to add a new record and save changes; circulate to support.
  6. Quick check (5'): Exit ticket – write one reason why files are needed and one advantage over variables.
Conclusion:
Summarise that files provide permanent storage, enable large data handling, and support sharing and backup. Collect exit tickets to gauge understanding. For homework, ask students to draft a short description of how a game could use files to save high scores.