What Python skill does the Canning Vale project teach?
How a function remembers a variable. Learners build eight tiny functions in a loop, one for each year level from Kindergarten to Year 6, and run them on public enrolment figures for Canning Vale's government primary schools. Every function returns the Year 6 number. Seven of 40 checks still pass by coincidence, which is the real lesson about testing.
Canning Vale is a large family suburb on Perth's south-east side, shared between two councils. Nearly every home is a separate house, and more than half of its families are couples with children. That makes its school enrolment table, published by the WA Department of Education, a natural first dataset for young Python programmers.
Facts last verified 12 October 2026. Teaching is online; no Canning Vale branch is claimed.
Courses that build the habits the closure project needs. A free trial sets the level.

Functions, scope and tests, practised on real tables.
See the syllabus
Python from scratch to readable, checked programs.
See the syllabus
Typed Python for children, in short projects they can verify.
See the syllabus
Cleaning and summarising data before trusting any output.
See the syllabusBrowse the course atlas for more than one hundred options and use the coding roadmap to check prerequisites.
The four we are known for
These run underneath everything above. Every one is live and online, placed by ability rather than by age, and the first class is free.

Python, web and AI projects where the learner still owns the thinking.
See the syllabus
Automate the work you already do, then let AI carry part of it.
See the syllabus
Train a model, read what it learned, and be able to say why it is wrong.
See the syllabus
Run AI coding agents on real work without losing control of the codebase.
See the syllabusCounts for the Canning Vale suburb and locality (ABS SAL50245) from 2021 Census QuickStats, read on 12 October 2026.
| Measure | Value |
|---|---|
| People | 34,504 |
| Median age | 37 |
| Families | 9,386 |
| Private dwellings | 11,053 |
| People per household | 3.1 |
| Bedrooms per dwelling | 3.9 |
| Share | Canning Vale | WA |
|---|---|---|
| Separate houses | 94.4% (9,854) | 79.7% |
| Couple families with children | 57.7% (5,417) | 44.6% |
| Residents aged 15 to 19 | 7.2% (2,481) | 5.8% |
| Drove a car to work | 66.5% (11,553) | 62.1% |
The Census counted exactly 2,394 residents aged 5 to 9 and another 2,394 aged 10 to 14. Equal numbers in real data turn out to matter in the project below.
Our grid test puts about 61% of the suburb's area in the City of Canning and 39% in the City of Gosnells. The suburb figures here cover both parts.
The 2021 Census was taken during the pandemic, so the share driving to work describes that particular week.
The ABS rounds percentages and slightly adjusts small counts to protect privacy, so table parts may not sum to totals. We quote its figures exactly and do not add rows together.
The Department of Education list gives student numbers for every year level at each WA school, as at the 2026 Semester 1 census. Our map test finds five government primary schools inside the Canning Vale outline. Learners want one small function per year level, so they write a loop.
| Year level | Published | Buggy function | Fixed function |
|---|---|---|---|
| Kindergarten | 81 | 130 | 81 |
| Pre-primary | 90 | 130 | 90 |
| Year 1 | 118 | 130 | 118 |
| Year 2 | 125 | 130 | 125 |
| Year 3 | 135 | 130 | 135 |
| Year 4 | 133 | 130 | 133 |
| Year 5 | 127 | 130 | 127 |
| Year 6 | 130 | 130 | 130 |
Each lambda stores the name of the loop variable, not its value. Python looks the name up when the function runs, and by then the loop has finished on Y06.
Across five schools and eight year levels, 33 lookups return the wrong number. The bug is total, yet it does not crash and every output looks like a plausible enrolment.
Five checks pass because Year 6 is genuinely Year 6. Two more pass because one school has 64 students in both Year 4 and Year 6, and another has 38 in both Year 5 and Year 6.
A learner who tested only the last item, or happened to pick a school with matching numbers, would ship the bug. Good tests use values that cannot coincide. Here that means checking a year where the published figure differs from Year 6, at more than one school.
Student numbers come from the WA Department of Education schools list, downloaded on 12 October 2026. Which schools sit inside the ABS outline is decided by our own point-in-polygon test on the list's coordinates. The lookups, counts and checks are our own script; schools are described by size rather than named.
The fix is one short change: give each lambda a default argument, yl=yl, which is evaluated once, at the moment the function is created.
| Step | Learner task |
|---|---|
| 1 | Read the schools list and keep government primaries inside Canning Vale. |
| 2 | Build a dict of eight getters with a comprehension and print every result. |
| 3 | Count wrong lookups, then list the lucky passes and explain each one. |
| 4 | Apply the default-argument fix, or a small factory function, and rerun the checks. |
A second dataset makes the point again. The suburb's government secondary college lists 247 students in Year 8 and 247 in Year 11. A getter that wrongly read Year 11 would pass a Year 8 check there and fail nowhere else in that row. Learners write a rule of thumb for their notebooks: before trusting a test, ask whether the wrong answer could equal the right one.
Label boxes with sticky notes, move the last note onto every box, and spot why each box now says the same thing.
Reproduce the bug, fix it two ways, and design tests that a coincidence cannot pass.
Find the same pattern in callbacks, event handlers and loops that schedule work in real code.
Details from the Department of Education list, the ABS boundaries and the 2027 term dates.
Inside the outline our test finds five primary schools, one senior high college and one education support centre.
Four of those seven sit on the City of Gosnells side and three on the City of Canning side, by the same test.
WA public schools start on Monday 1 February 2027; the first term closes on Friday 9 April.
Outline used
Canning Vale is the ABS suburb outline of about 25.3 square kilometres. Council shares come from our own test of a regular grid of points against the two ABS council outlines.
Ages give a rough guide; the trial lesson decides.
Scratch projects that build careful sequencing.
Scratch Coding for KidsCoding for KidsVariables, loops and small functions in real code.
Python and AI for KidsMaths Through CodingFiles, functions and tests on public tables.
Python for TeensData Science for TeensAutomation and clean, tested scripts.
Python MasterclassPython Automation CourseNot reliably, and that is the reason to understand it.
Closures created in loops are a classic trap, and AI assistants still write them, especially in callbacks and dictionary comprehensions. The code runs, the numbers look sensible, and nothing warns you.
A Canning Vale learner who has watched 33 lookups go wrong will recognise the pattern in generated code at a glance, and will know to test with values that cannot coincide.
Our Python classes treat AI output as a draft that still needs a proper test. The longer argument is in why teenagers should still learn to code in 2026.
Lessons run live over video, so there is no drive along Ranford or Nicholson Road.
A teacher leads every lesson and reviews code as it is typed.
Classes follow the WA terms and pause in the holidays.
One free lesson, followed by a written recommendation.
Fifteen to twenty learners at one level, or one to one.
Around eight lessons a month.
A 5:30pm Canning Vale lesson starts at 3pm in India.
Steady clocks
The IANA time zone database records Western Australia's last daylight saving period ending in March 2009, so lesson times never shift against India.
Fees are identical for every learner.
Your first lesson is free and includes a plan.
Group classes: about eight lessons monthly, fifteen to twenty learners.
One-to-one: about eight lessons monthly with one teacher.
Fees are set in US dollars and begin only once the trial has chosen a course and a weekly time. The pricing page covers holidays and missed lessons.
Rated 4.9 across 547 Google reviews. These are real reviews, reproduced as written.
★★★★★
"The one step solution for my son. Modern Age Coders make learning coding so simple that kids love it. The teachers explain complex concepts clearly with practical exercises and interactive content."
Ria Mukherjee
Parent
★★★★★
"Modern Age Coders has been a game-changer for me. I struggled to grasp IT concepts and coding before joining, but their classes transformed everything. I can now confidently write complex programs with ease."
Samriddha Mondal
Student
★★★★★
"One of the most wonderful education centres out there. Education is not limited to school syllabus but focuses on skill development."
Vansh Agarwal
Student
★★★★★
"My child Dhairya is really enjoying the Modern Age Coders classes. This is his first online class and he eagerly looks forward to it. I can already see his improvement, and the teachers are very cooperative."
Sonam Oswal
Parent of Dhairya
★★★★★
"Modern Age Coders have wonderful teachers who teach in a clear, easy and practical way. The teacher boosts students' confidence and inspires them to learn without hesitation."
Sonu Goyal
Parent
★★★★★
"I highly recommend this computer coding class! The teachers are incredibly knowledgeable and passionate about coding."
Ritu Kedia
Parent
Tell us the learner's age and interests. A younger child might play the sticky-note game; a teenager might fix the closure bug.
Common questions from Canning Vale families and adult learners.
The 2021 Census counted 34,504 people in the Canning Vale suburb, with a median age of 37.
Both. Our test of the ABS outlines puts about 61% of its area in the City of Canning and 39% in the City of Gosnells.
A function that remembers variables from the place where it was created. It remembers the variable itself, not a snapshot of its value.
Python looks up a closure's free variables when the function is called. In a loop, that is usually after the loop has ended.
Many start typed Python at about 9 or 10 after some block coding. The trial lesson checks readiness.
From the WA Department of Education schools list, which gives student numbers by year level as at the 2026 Semester 1 census.
No. Lessons are live online only, we have no Australian office, and our listed phone number is Indian.
The first lesson is free. Group classes cost USD 100 a month for two live lessons a week, about eight a month, in groups of fifteen to twenty, and one-to-one classes cost USD 150 a month. You agree the course and time before paying.
By level and pace in groups of fifteen to twenty, not by age or suburb. One-to-one lessons suit anyone no group time fits.
Yes. Adults join adult groups or private lessons, often to automate tasks at work.
See the Perth page for the city, the Western Australia guide for the state, and the Python and AI course for kids for younger starters.