Lesson 1: Defining functions, giving a piece of work a name
15 min read·14 Oct 2026
Module 6 · Lesson 1 · About 45 minutes · Needs: Modules 1 to 5 (variables, f-strings, if, loops, lists)The situation
Amira has a complaint. "Last week you told me Ben owed 180 pence. Yesterday your notebook said something else. I want the same answer every time." She is right to worry. Your fee sum is typed out afresh in every cell that needs it, and every copy is a chance to type it differently.
This lesson gives each rule one name and one home. Ben's loan L13, The War of the Worlds, borrowed on shelf day 21, runs through the whole lesson: due on day 35, 9 days late on day 44, 180 pence owed.