Lesson Plan

Lesson Plan
Grade: Date: 17/01/2026
Subject: Computer Science
Lesson Topic: Understand and use library routines
Learning Objective/s:
  • Describe what a library routine is and why it is used.
  • Identify common Python library categories and their typical functions.
  • Demonstrate how to import, call, and store results from library routines.
  • Apply library routines to solve problems such as distance calculation and dice simulation.
  • Evaluate code for correct syntax and appropriate use of library documentation.
Materials Needed:
  • Projector or interactive whiteboard
  • Computer lab with Python IDE (IDLE or VS Code)
  • Printed handout of library routine reference table
  • Sample code snippets (digital)
  • Worksheets with practice questions
  • Access to Python documentation (online or printed)
Introduction:
Begin with a quick poll: “Which built‑in functions have you used before?” Connect this to prior work on functions and explain that today’s focus is on reusable library routines. State the success criteria: students will be able to import, call, and apply library functions correctly in their programs.
Lesson Structure:
  1. Do‑now (5'): Quick quiz on common built‑in functions displayed on the board.
  2. Mini‑lecture (10'): Define library routines, discuss benefits, and review Python categories with slides.
  3. Guided demo (15'): Walk through the distance‑between‑points example, highlighting import, call, store, and output steps.
  4. Pair programming (15'): Students complete two practice tasks (dice roll using random.randint() and word length using len()) while the teacher circulates.
  5. Concept check (5'): Whole‑class Q&A on syntax errors and import requirements.
  6. Reflection (5'): Students write one key takeaway on a sticky note and share.
Conclusion:
Recap the four‑step process for using a library routine and highlight the importance of checking documentation. Collect exit tickets where each student writes one library function they will try at home. Assign homework: modify the distance program to calculate the perimeter of a triangle using math.sqrt() and abs().