Parameters
Parameters define the contract. Fewer, clearer parameters mean a function that is easier to reuse and much harder to misuse.
Every function is a promise: give me this, and I will give you that.
Students move from writing functions to designing them — deciding what goes in, what comes out, and what the function has no business knowing about. Scope explains why a variable that exists inside a function is invisible outside it.
Function design is the beginning of software architecture. It is also the fastest way to make a long program understandable.
Three core ideas, each taught with worked examples and then practised until it feels obvious.
Parameters define the contract. Fewer, clearer parameters mean a function that is easier to reuse and much harder to misuse.
Return patterns matter: return one clear value, return early when the answer is already known, and avoid printing inside a function that is meant to calculate.
Local scope means variables born inside a function die with it. This is a feature — it stops distant parts of a program from stepping on each other.
The idea of local scope was invented to solve a real crisis: in early languages every variable was global, and large programs became almost impossible to fix.
“Global variables are simpler.” They are simpler for ten lines and a nightmare at two hundred, because anything can change them from anywhere.
Sessions 25–32 of the 72-session year, at two one-hour sessions per week.
Where this module fits, what you will build, and a hands-on starter that gets everyone curious about parameters.
Guided teaching on parameters, worked through together with the teacher.
Independent practice, small challenges and one deliberate mistake to diagnose.
Guided teaching on return patterns, building directly on the previous two sessions.
Applied tasks that combine parameters and return patterns in one piece of work.
Local scope introduced and practised, completing the toolkit needed for the project.
Guided build session for the module project: Reusable maths challenge engine.
Finish, test against the checklist, present the work and explain the decisions behind it.
Every module ends with something the student built themselves and can demonstrate. This is the piece that goes into their portfolio and gets explained out loud at the end of session 32.
Build a challenge engine that generates a random maths question, checks the answer and tracks a score — with each job in its own function.
Students finishing Module 4 can:
The vocabulary introduced here, in plain language:
6 quick questions drawn from this module — vocabulary, the project you build, and a myth-or-fact round. Every wrong answer explains itself, so a mistake still teaches you something.
Tell us your child’s class and what they enjoy. We will suggest the closest program fit—no pressure and no upfront payment.