Hong Kong · Upper primary · P4, P5 and P6

Coding for P4 to P6 in Hong Kong

Since 2023, almost every P4 to P6 pupil at a publicly funded Hong Kong school has had coding on the timetable. Parents often hear the name of the module and little else. Here is what it asks for, how much time it really gets, and where a live one-to-one class in English can take a child who wants to go further.

Live classes since 2020 · 10,000+ students worldwide · P4 to P6 pupils in Hong Kong learn one to one, in English

What parents need to know

Hong Kong P4 to P6 pupils at publicly funded schools follow the Education Bureau's enriched coding module: about 10 to 14 hours a year, usually one short lesson a week, covering abstraction, algorithms, loops, conditions, variables, testing and simple automation. Modern Age Coders teaches P4 to P6 children live online, one to one and in English, with a mentor in India, at times your family picks. We start where the school unit stops, give the child longer projects of their own, and move them from blocks to typed Python. The first class is free.

Courses first

Which course suits a P4 to P6 coder?

The three we place most upper-primary children into. Which one comes first depends on whether your child already handles blocks comfortably, and on what they want to make.

How it arrived

What is the EDB enriched coding module for upper primary?

It is a set of lesson materials for P4, P5 and P6, issued by the Education Bureau one year at a time and adapted from CoolThink@JC, a programme funded by the Hong Kong Jockey Club Charities Trust. Schools fit it into existing computer lessons.

The upper-primary coding module, year by year, from the EDB's own circulars
LevelCircularWhat the EDB says
P4EDBCM No. 109/2023, 19 June 2023Covers "abstraction, algorithm and automation"; P5 and P6 modules to follow in phases in 2023/24
P5EDBCM No. 32/2024Second level, building on P4 (named in the EDB curriculum overview)
P6EDBCM No. 152/2024, 11 July 2024Projects that apply programming "to solve real-life problems"
All threeEDBCM 109/2023 and 152/2024"10 to 14 hours of enriched coding education for all upper primary students at each level every year"
ReachLegCo reply, 14 May 2025Almost all publicly funded primary schools have implemented enriched coding at upper primary

Sources: EDB circular memoranda 109/2023 and 152/2024; EDB Key Learning Area curriculum overview page; Government reply to a LegCo question on AI talent, 14 May 2025. All read 23 November 2026. International schools and private schools set their own curricula.

How much time that really is

The 2020 supplement suggests schools "allocate one lesson (35/40 minutes per lesson) per week at each upper primary level", or bunch lessons together with "block scheduling" in one term. By our arithmetic, 10 hours of 40-minute lessons is 15 lessons, and 14 hours of 35-minute lessons is 24.

Across P4, P5 and P6 together, the recommendation works out at roughly 30 to 42 hours of class time (our multiplication, not an EDB figure). That is shared with a whole class and one teacher.

Where the material comes from

CoolThink@JC describes its own curriculum as "14+ hours of computational thinking and coding education in formal ICT lessons annually to P4-6 students, covering 3 levels and 24 units of sequential materials". Its June 2023 slides for teachers mention Level 2 for P5, Level 3 for P6, and Scratch and App Inventor projects.

So most children reach P6 comfortable with block coding and with words like "algorithm", having built short apps and games in class. That is a good base; our online coding classes for kids page shows how a lesson builds on it.

The learning elements

What does the P4 to P6 coding curriculum actually cover?

The module follows the EDB's 2020 supplement, which lists learning elements for key stage 2. We have taken each one, quoted the EDB's wording, and set beside it what a one-to-one class can add that a class of thirty usually cannot.

Upper-primary learning elements (EDB, 2020) and what a one-to-one class adds
ElementThe EDB's wordsAdded in a one-to-one class (our view)
Decomposition"Know how to decompose the problem into sub-problems"The child plans a project of their own and splits it, aloud, before coding
Iteration"ending condition needs to be set in an iteration"Loops that must stop, tested until they do
Selection"Use comparison operators (>, < and =) and logical operators (AND, OR, NOT)"Rules with several conditions, as in the badge lesson below
Testing"Develop appropriate steps and data to test programs"Choosing test cases that could prove the program wrong
Debugging"Fix the errors of program"Reading the error, predicting, fixing one thing at a time
Physical objects"Control physical objects with the Integrated Development Environment"Not taught by us: we teach code, not hardware kits

Quotations from the EDB's Computational Thinking: Coding Education supplement to the primary curriculum (2020), chapter 3, read 23 November 2026. The right-hand column is our own judgement, not an EDB statement.

The element we spend most time on

Testing. The supplement asks pupils to "anticipate how changing program statements/codes can change the operation / output(s) of the program". In a busy class, a program that seems to work is usually marked as done. One to one, the mentor asks: "which input would break it?"

That single question turns a child who writes code into a child who checks code, and it carries straight over to checking a maths answer.

The one we leave to school

Sensors, motors and micro:bit-style boards. They are part of the EDB's list and many schools do them well with kits in the room. We teach online and we teach programming; we do not post hardware or run robot builds.

If your child loves the hardware side, keep it at school and use our classes for the thinking behind it. Our guide to thinking like a programmer explains the habits we build.

A P4 to P6 lesson, in full

What does a lesson on AND, OR and NOT look like?

This one starts from a rule a child might see on a school library poster. Turning a sentence into code exposes two mistakes that adults make too: mixing up AND and OR, and forgetting what "at least" means.

  1. Read the poster. A reading badge goes to pupils who read at least 100 pages AND (three or more books OR a book review), and NOT anyone with an overdue library book.
  2. Write a first try. Most children type the rule in the order they read it, without brackets, and with "more than 100" because it sounds right.
  3. Write a careful version. The mentor asks the child to say where the brackets go on the poster, and what "at least 100" includes. The second function uses brackets and >=.
  4. Invent test pupils. Seven pupils, each chosen to test one part of the rule: one just under 100 pages, one exactly at 100, one with an overdue book.
  5. Compare the two versions. Where they disagree, the child decides which one matches the poster, and explains why in one sentence.
The reading badge: one rule, two versions, seven test pupilsPython
# The reading badge: our own P4 to P6 lesson on AND, OR and NOT.
# Rule on the poster: at least 100 pages AND (3 or more books OR a book review),
# and NOT any overdue library book.
readers = [
    # name, pages, books, review, overdue
    ("Ka Yan", 140, 4, False, False),
    ("Hiu Tung", 100, 2, True, False),
    ("Chun Hei", 99, 5, True, False),
    ("Sze Wing", 180, 1, False, False),
    ("Tsz Ho", 220, 6, True, True),
    ("Wing Lam", 120, 3, False, False),
    ("Pui Shan", 100, 3, False, False),
]

def first_try(pages, books, review, overdue):
    return pages > 100 and books >= 3 or review and not overdue

def fixed(pages, books, review, overdue):
    return pages >= 100 and (books >= 3 or review) and not overdue

for name, pages, books, review, overdue in readers:
    a = first_try(pages, books, review, overdue)
    b = fixed(pages, books, review, overdue)
    line = f"{name:9} first try: {str(a):5}  fixed: {b}"
    if a != b:
        line = line + "   <- different"
    print(line)

The pupils, page counts and rule are invented by us. Copy the program into any Python 3 environment; it prints exactly the lines below.

OutputOutput
Ka Yan    first try: True   fixed: True
Hiu Tung  first try: True   fixed: True
Chun Hei  first try: True   fixed: False   <- different
Sze Wing  first try: False  fixed: False
Tsz Ho    first try: True   fixed: False   <- different
Wing Lam  first try: True   fixed: True
Pui Shan  first try: False  fixed: True   <- different

Three pupils expose the first try. Chun Hei read only 99 pages but gets a badge because the review alone switches it on. Tsz Ho has an overdue book and still gets one. Pui Shan read exactly 100 pages and is wrongly refused, because > 100 leaves out 100.

Why the first try fails

Python, like most languages, does AND before OR. So the first try really means "(more than 100 pages and 3 books) or (a review and no overdue book)". Read that way, the NOT only guards the review, and the page count only guards the books.

Notice Hiu Tung: both versions say yes, but the first try is right for the wrong reason. A test that passes does not prove a program correct, which is why we pick test pupils on purpose.

What the child takes away

Brackets are not decoration; they say what belongs together. "At least" means >=. Good test data sits right on the edges: 99, 100, an overdue book on an otherwise perfect reader.

This is exactly the selection and testing work in the EDB list above, done with a real rule from a child's own day. Families wanting more of this kind of reasoning often pair it with our Python course in Hong Kong.

  1. Add a pupil who makes the first try say no and the fixed version say yes for a different reason than Pui Shan.
  2. Change the poster. Badges now need a review as well as three books. Rewrite the fixed function.
  3. Count the cases. With pages fixed at 150, how many of the eight true and false combinations of the other three earn a badge?
  4. Say it in English. Write the fixed rule as one clear sentence a P2 pupil would understand.

P4, P5 and P6 at home

What should a child do at home in P4, P5 and P6?

Something that complements the school year rather than repeating it. Here is how we usually plan the three years for a Hong Kong child at a local school; children at international schools follow the same arc from wherever they are.

Our plan for upper-primary coding at home, alongside the school module
YearAt school (EDB module)With us, one to one
P4Abstraction, algorithm and automation; short block tasksA first project the child designs; loops that stop; first test cases
P5Second module level; longer block programs and appsVariables and conditions with AND, OR, NOT; move to typed Python
P6Projects solving real-life problemsA Python project of their own, plus checking habits before secondary school

School column summarised from EDBCM 109/2023 and 152/2024 and CoolThink@JC materials; the right-hand column is our own plan. Read 23 November 2026.

P4: own an idea

The leap is from following steps to choosing a project, even a tiny one.

P5: type it

Most children can move to Python this year, starting with turtle drawings and quizzes.

P6: check it

Testing and explaining, the habits secondary computer lessons will assume.

Ten- and eleven-year-olds in other countries follow a similar path; our page on coding for 10 year olds describes it in general terms, and coding taught in English in Hong Kong covers the language side.

The busy year

Should a P6 child keep coding during tests and secondary allocation?

Many do, at a lighter pace. P6 is crowded in Hong Kong, but coding is not one of the subjects scored for secondary allocation, so it carries no exam pressure of its own.

Keeping it light

Families often switch to a shorter or less frequent lesson in test weeks, then pick up again. Because each lesson is one to one, nothing is missed in a group; the mentor simply continues from the last saved project.

A weekly hour spent building something can be a welcome change from revision. We suggest keeping at least occasional contact through P6, so that the habit is still there in S1.

Looking ahead to S1

Secondary schools teach programming as part of computer lessons, and the EDB also asks for AI lessons in junior secondary. A child who arrives in S1 already able to type and test Python has room to enjoy it instead of catching up.

For contest-minded children, HKOI also runs a primary contest whose events, in its words, "will be using the Blockly programming language". We prepare for the thinking it asks for and promise no result. See coding for primary students in Hong Kong for the full P1 to P6 picture.

English, one to one

Is an English-taught class right for a P4 to P6 child?

For most, yes. By upper primary a Hong Kong child has had English lessons every year since P1, and coding vocabulary is short and visual.

The words they need

Condition, loop, variable, test, bug: perhaps twenty words cover most of upper-primary coding. The mentor writes each one in the chat the first time and uses it again until it sticks.

Explaining a bug in English, out loud, to one adult who waits for the answer is a quiet form of speaking practice that many children find easier than a class presentation.

Why only one to one in Hong Kong

We offer Hong Kong families private lessons only. The mentor sets each problem for one child and notices the second a child goes quiet.

You can see every course we run for families here on our Hong Kong coding classes page, and compare monthly costs on coding class fees in Hong Kong.

Progress

How will we see progress from P4 to P6?

Our own milestones for upper-primary children. They are not EDB levels and they do not map to school marks.

Upper-primary coding: our milestones
MilestoneYour child canEvidence
PlanSplit a project into three or four parts before codingA written or spoken plan
StopWrite a loop with a clear ending conditionA game that ends when it should
CombineJoin conditions with AND, OR and NOT correctlyA rule that passes edge-case tests
TestChoose inputs that could break a programA short list of test cases
TypeWrite short Python programs without blocksA typed project that runs
ExplainDescribe a bug and its fix in two sentencesA note in their own words

For pupils

At least means >=. Write it down before you code.

A test that passes is good news, not proof.

For parents

Ask your child which test case caught the bug this week.

A monthly note tells you which milestone comes next.

More courses

Nine more courses for upper-primary children

Live, in English, one to one for Hong Kong families.

I

Building on blocks

P4 and up

CBZ / BLOCK / 01

Scratch Coding for Kids

Longer games than a school unit allows.

Open the syllabus

CBZ / BLOCK / 02

App Making for Kids

Block-built apps, like the school module, taken further.

Open the syllabus

CBZ / BLOCK / 03

Minecraft Coding for Kids

Loops and logic inside a building game.

Open the syllabus
II

Typing

P5 and up

CBZ / TYPE / 01

Maths Through Coding

Primary maths turned into Python experiments.

Open the syllabus

CBZ / TYPE / 02

Roblox Game Coding

Luau scripts that run in a shared world.

Open the syllabus
III

Ideas and AI

P5 and P6

CBZ / IDEA / 01

AI Literacy for Kids

Training and testing a tiny model by hand.

Open the syllabus

CBZ / IDEA / 02

Vibe Coding for Kids

Asking an AI helper for a game, then checking it.

Open the syllabus

CBZ / IDEA / 03

Web Development for Kids

Pages a child writes and publishes.

Open the syllabus

Timing and setup

When do P4 to P6 children have their lessons?

Any day, any time, flexible: one to one at the hour that suits your family, weekdays or weekends. India runs two and a half hours behind Hong Kong all year, so a mentor there is mid-afternoon when school ends here.

After school

4:30 pm in Hong Kong is 2 pm in India.

After dinner

A 7 pm lesson is 4:30 pm for the mentor.

Sunday

11 am in Hong Kong is 8:30 am in India.

Computer, not phone

A laptop or desktop with camera and microphone.

Free software

Scratch in the browser; Python set up in lesson one.

Same mentor

One person who knows your child's projects.

Around tests

Shift or pause lessons in exam weeks.

Saved work

Projects kept so nothing restarts from zero.

Monthly update

A short note on progress and the next goal.

Student work

Work by children in our classes

Projects from our longer courses; see the student labs for more.

NutriLife AI nutrition coach project screenshot

AI and ML

NutriLife

An AI nutrition coach that reads what you eat and works you toward a target.

by Bhavya · Open it

Misti AI chatbot for maths and coding screenshot

AI and ML

Misti

A chatbot that answers mathematics and programming questions, built and deployed by a student.

by Harshit · Open it

GuardianX AI internet safety assistant screenshot

AI and ML

GuardianX

An assistant that helps a young person recognise unsafe situations online.

by Vivaan · Open it

SkyCast weather forecast application screenshot

Web app

SkyCast

A weather forecasting site with live conditions for any location.

by Krish

Fees

Fees for upper-primary coding

One monthly fee, shown in Hong Kong dollars on the card below, paid a month at a time with no lump sum and nothing prepaid for months ahead. A payment-gateway charge, if any, appears at checkout before you confirm.

Free first class

Free

no card required

  • A free trial lesson, one to one
  • A small program built together
  • No payment details to book
Book it

One to one

$1,200 HKD

a month, eight live classes

  • A mentor for one child only
  • Projects matched to P4, P5 or P6
  • Your choice of lesson times
Start here

What families say

Rated 4.9 across 547 Google reviews

Google reviews from parents and students, unedited.

★★★★★

"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

P4 to P6 parents ask

Coding in P4 to P6: questions and answers

What is the EDB enriched coding module?

A set of coding lessons for P4, P5 and P6 that the Education Bureau issued between 2023 and 2024 for publicly funded schools, adapted from CoolThink@JC. Schools are asked to give 10 to 14 hours of coding at each level every year.

How many coding lessons does my child get at school?

It varies by school. The EDB suggests one 35 or 40 minute lesson a week, or a block in one term. By our arithmetic, 10 to 14 hours is roughly 15 to 24 lessons a year.

Will your classes repeat what school teaches?

No. The free first class checks what your child already knows, and we start beyond it: longer projects, testing, and usually typed Python by P5.

Do you teach robotics or micro:bit?

No. The EDB list includes controlling physical objects, which schools do with kits. We teach programming online and leave hardware to school.

Does coding count for secondary allocation?

No. The subjects scored for SSPA banding do not include coding or computer lessons. We never promise any allocation outcome.

What language are the classes taught in?

English, by mentors based in India, spoken clearly and adjusted to your child. We do not teach in Cantonese or Mandarin.

Are classes live, and are they one to one?

Both. Each lesson is a live video call with one mentor and one child, sharing a screen.

When can the lessons be?

Any day, any time, flexible: one to one at the hour that suits your family, weekdays or weekends. A 5 pm lesson in Hong Kong is 2:30 pm in India.

Will you help with my child's school coding project?

We help the child understand the ideas and plan their own approach. We never do the project for them.

How are fees charged?

Monthly, shown in Hong Kong dollars, with any gateway charge displayed before payment. The first class is free.

Related

More for upper-primary families in Hong Kong

Further reading for P4 to P6 parents.

Primary students, P1 to P6

The whole primary picture, year by year.

AI for kids in Hong Kong

AI ideas suited to upper primary.

Python in Hong Kong

Where typed coding leads.

Think first, then use AI

Using AI without handing over thinking.

Coding for 12 year olds

The step after P6.

Coding roadmap

A map from blocks to projects.

More pages for Hong Kong

Part of the guide: Every Hong Kong page

More guides: Coding and AI classes in Hong Kong · 中文:英文授課編程課程 · Start here: Online coding for kids · AI, vibe coding and AI agents: AI agents course · Coding subjects and courses: App development · HKDSE ICT and maths: DSE ICT elective guide · IB, IGCSE, A-level and SAT: A level Computer Science tutor · Olympiads and competitions: AMC 10 preparation · Guides for families: After-school coding · School holidays: AI summer course · Districts and areas: Causeway Bay

Start here

Book a free class for a P4 to P6 child

Tell us the school year and anything your child has built at school. The mentor sets a short task at two levels, your child builds and tests something, and you hear which course should come first.

Want details first? Every course in our course list has a syllabus, and how we teach describes a lesson.

WhatsApp us · +91 91233 66161 · connect@modernagecoders.com

Live online lessons, one to one, in English, with mentors in India. WhatsApp is quickest.

Free first class; no card asked for.

Want a class sooner? Book a priority demo

A priority demo is a full class of about 45 to 60 minutes. After the class the mentor sends a written skill report and a personal learning roadmap on WhatsApp. If you enrol, the demo fee is adjusted against your first month's fee. Share your demo Order ID with us on WhatsApp and we take it off.

Book a priority demo

Keep exploring Modern Age Coders

Related courses and guides

Learn more

Free resources

From the blog

Start here

Free classPriority demoCall us