MALE / BASE / 01
Python for Teens
From first program to files, functions and classes.
Open the syllabusHong Kong · Machine learning · Ages 14 to adult
The question we hear most from Hong Kong families about machine learning is not which library to use. It is "is my maths good enough?" The honest answer is that machine learning rests on four pieces of school mathematics, and the DSE spreads them across the Compulsory Part and two optional modules that most students take only one of, or neither. This page sets out the course in order, the mathematics each step leans on, and how a one-to-one mentor fills whatever gap a learner arrives with.
Teaching since 2020 · 10,000+ students worldwide · every Hong Kong learner is taught one to one, live online, in English
The short answer
Modern Age Coders teaches machine learning to Hong Kong learners from about 14 to adult: live online classes, one to one and in English, at flexible Hong Kong times. The course runs in a fixed order, Python first, then data and statistics, then vectors and matrices, then models, evaluation and a first neural network. Each step uses mathematics that the HKDSE places in the Compulsory Part, Module 1 or Module 2; a learner missing a piece is taught it alongside the code, not sent away. The first class is free and includes a short maths check.
Start here
Three courses cover most learners who reach this page. For Hong Kong each is taught one to one.

MALE / 01
For secondary students of about 14 to 17. Python, then regression, classification and a first neural network on real data, with the maths introduced the moment the code needs it.
Open the syllabus →
MALE / 02
For anyone whose maths is the worry. Statistics, probability, vectors, matrices and the calculus of optimisation, each tied to a model it powers.
Open the syllabus →
MALE / 03
For university students and adults. Classical models through deep learning, with proper evaluation and a project defended at the end.
Open the syllabus →The maths map
Four areas: statistics and probability, vectors and matrices, functions and their slopes, and a habit of checking data. Here is where each one sits in the Hong Kong senior secondary curriculum, according to the CDC and EDB documents.
| Machine learning idea | Maths behind it | Where the DSE teaches it |
|---|---|---|
| Summarising a dataset | Mean, spread, standard deviation | Compulsory Part, "Measures of dispersion" |
| Spotting misleading data | Sampling, bias, misuse of graphs | Compulsory Part, "Uses and abuses of statistics" |
| Naive Bayes and spam filters | Conditional probability, Bayes' theorem | Module 1 only: the Compulsory Part says "Bayes’ Theorem is not required." |
| Errors and noise | Expectation, variance, the normal distribution | Module 1, units 12 and 16 |
| A model's weighted vote | The dot product of two vectors | Module 2, "Scalar product and vector product" |
| Whole datasets at once | Matrices and linear systems | Module 2, "Matrices" and "Systems of linear equations" |
| Training by small steps | Derivatives and slopes | Module 1 "Derivative of a function"; Module 2 "Differentiation" |
Sources: CDC, Learning Content of Senior Secondary Mathematics (2017); EDB Explanatory Notes to Module 1 (Calculus and Statistics) and Module 2 (Algebra and Calculus), 2009 with updates in August 2018; Compulsory Part explanatory notes. Read on 23 November 2026. The mapping from units to machine-learning ideas is ours; the documents themselves do not mention machine learning.
The Compulsory Part carries a total lesson time of 250 hours in the CDC document, and each module adds 125. Statistics and probability live partly in the core, but Bayes' theorem, distributions and expectation are in Module 1. Vectors, the dot product and matrices are in Module 2.
So a DSE student with M1 has the probability side of machine learning and not the linear algebra; a student with M2 has the opposite. The HKEAA states that "Candidates are allowed to choose only one of the modules if they take the Extended Part." Nobody leaves school with both from the DSE alone.
In the 2026 HKDSE, 3,655 candidates sat Module 1 and 7,979 sat Module 2, out of 58,487 registered for the exam (HKEAA results release, 2026). Most DSE candidates take neither module.
That is not a barrier to machine learning. It means most learners need some of the mathematics taught with the course, which is exactly what one-to-one teaching is good at. For the module details, see our HKDSE M1 and HKDSE M2 tutor pages.
Course path
Code before models, data before algorithms, and each new piece of mathematics just before the model that needs it. This is the order we teach, whatever the learner's age.
| Stage | What the learner builds | Maths taught at this stage |
|---|---|---|
| 1. Python | Programs that read files, loop and use functions | None new; careful arithmetic |
| 2. Data | Cleans a messy table, charts it, finds outliers | Mean, median, standard deviation |
| 3. First model | A straight-line fit that predicts a number | Gradient of a line, squared error |
| 4. Classification | A perceptron, then logistic regression | Dot product, probability as a score |
| 5. Evaluation | Train and test splits, accuracy and its traps | Conditional probability, rates |
| 6. Many features | Models on whole tables at once | Vectors and matrices |
| 7. Neural network | A small network written by hand, then a library | Derivatives and the chain rule |
| 8. Project | A model on data the learner chose, defended in English | Whatever the project needs |
This path is our own teaching plan, not an official syllabus. Stages 1 and 2 take longest for beginners. Learners who already code skip ahead after the free class. Hong Kong school students meet related ideas in the ICT curriculum, whose 2021 guide lists “pattern recognition through artificial intelligence (AI) and data science” among its examples of technological innovation.
Every machine learning library a learner will meet is driven from Python, and Python is also one of the two languages the DSE ICT curriculum lists. A student who arrives fluent in it starts at stage 2.
A learner who has never coded spends the first weeks in our Python course for Hong Kong learners or its equivalent, and that time is never wasted.
A teenager told to "learn linear algebra first" for a year rarely comes back. A teenager who needs the dot product to make their own classifier work learns it in an afternoon, because the reason is on the screen.
So we introduce each idea when the code demands it, write it out by hand on the whiteboard, and only then let a library do it. The perceptron lesson below is the first place that happens.
A real lesson
One of the oldest learning machines, the perceptron, is a dot product, a threshold and a rule for fixing mistakes. We teach it at stage 4. It shows the dot product from Module 2 doing real work, and it shows a limit that took researchers years to get past.
# A perceptron: one dot product, one threshold, one update rule.
# Data invented by us: (hours practised, puzzles solved) -> 1 if the learner passed our mock test.
def dot(u, v):
return sum(a * b for a, b in zip(u, v))
def train(data, epochs=20):
w, b = [0.0, 0.0], 0.0
for epoch in range(1, epochs + 1):
mistakes = 0
for x, label in data:
guess = 1 if dot(w, x) + b > 0 else 0
if guess != label:
step = label - guess # +1 or -1
w = [wi + step * xi for wi, xi in zip(w, x)]
b += step
mistakes += 1
if mistakes == 0:
return w, b, f"settled after {epoch} passes"
return w, b, f"still {mistakes} mistakes after {epochs} passes"
mock = [((1, 1), 0), ((2, 1), 0), ((1, 3), 0), ((4, 5), 1), ((5, 3), 1), ((6, 6), 1)]
w, b, status = train(mock)
print("mock test:", status, "| w =", w, "b =", b)
for x in [(3, 2), (5, 5)]:
print(" new learner", x, "->", "pass" if dot(w, x) + b > 0 else "not yet")
xor = [((0, 0), 0), ((0, 1), 1), ((1, 0), 1), ((1, 1), 0)]
w, b, status = train(xor)
print("exactly-one-light (XOR):", status)All six learners and their marks are invented by us for teaching. Copy the file into any Python 3 and you will get the output below exactly; there is no randomness in it.
mock test: settled after 10 passes | w = [2.0, 2.0] b = -14.0 new learner (3, 2) -> not yet new learner (5, 5) -> pass exactly-one-light (XOR): still 4 mistakes after 20 passes
Weights of 2 and 2 with bias -14 mean the model predicts a pass when 2 times hours plus 2 times puzzles is above 14, which is the same as hours plus puzzles above 7 (our arithmetic). On XOR it is still wrong on all four points after 20 passes.
Module 2 teaches the dot product as a definition with properties. Here it becomes a vote: each feature speaks with the strength of its weight. Geometrically, w is a direction, and the rule "dot product plus b above zero" is a straight line across the plane, passes on one side and the rest on the other.
The update rule tips that line a little towards any example it got wrong. With data that a line can separate, it is guaranteed to stop eventually; here it took 10 passes.
No single straight line puts (0, 1) and (1, 0) on one side with (0, 0) and (1, 1) on the other. Try drawing it. So the perceptron cannot learn XOR however long it trains, and it says so: four mistakes, every pass.
Fixing this needs a second layer of units, which is where neural networks begin, and training those needs the derivatives of Module 1 or Module 2. A learner who meets the failure first understands why the extra machinery exists.
The next model in the course, a straight-line fit trained step by step, is set out on our page on building machine learning models in Python.
Filling gaps
Yes. Most of our Hong Kong learners have taken neither module, or only one. What changes is how much mathematics the mentor teaches alongside the code, and in what order.
| Learner arrives with | Already has | We teach alongside the course |
|---|---|---|
| DSE Compulsory Part only | Mean, dispersion, basic probability, straight lines | Bayes, vectors, matrices, slopes of curves |
| Compulsory Part and M1 | Bayes, distributions, derivatives | Vectors, dot product, matrices |
| Compulsory Part and M2 | Vectors, dot product, matrices, derivatives | Bayes' theorem, distributions, expectation |
| IB Mathematics AA or AI | Depends on SL or HL and options | Mapped in the free class |
| IGCSE or A-level Mathematics | Strong algebra; vectors at A-level | Probability distributions, matrices as needed |
| An adult who left maths years ago | Everyday arithmetic and judgement | Every piece, slowly, through code |
Unit placement from the CDC and EDB senior secondary mathematics documents cited above. The second and third columns are our teaching judgement for typical learners; individual schools and teachers cover more or less. International-school routes are described on our IB maths tutor in Hong Kong page.
If machine learning is a long-term interest, a module helps. M2 gives the linear algebra that underpins almost every model; M1 gives the statistics that tells you whether a model can be trusted. Neither is required to start, and we never advise on DSE subject choices beyond describing what each contains.
In S6, exam preparation comes first. Many students pause the course through the written examinations and return with more time afterwards.
Adults often fear the maths more than they need to. We start from a real dataset, build a model that works, and add mathematics only when the learner asks "why did that happen?" By then the answer is welcome.
For a version aimed at people already in work, see our page on AI and machine learning for working professionals.
By learner
The path is the same; the speed, the projects and the depth of mathematics differ. These are our usual routes for Hong Kong learners.
| Learner | Route | Why |
|---|---|---|
| 14 or 15, new to code | Python for Teens, then AI and ML for Teens | Code first; models follow quickly |
| 16 to 18, DSE with a module | AI and ML for Teens, maths gaps filled as they appear | Uses the module they already have |
| Visual learner, unsure about code | Orange Data Mining for Teens | Models by connecting blocks, then Python |
| University student | AI and ML Masterclass | Full classical and deep learning sequence |
| Adult worried about maths | Maths for Data Science and ML beside a first model | Confidence first, then depth |
| Already builds models | Deep Learning from First Principles | Networks written out by hand |
Routes are our recommendations, refined after the free class. A broader view of machine learning lessons for Hong Kong, with a different lesson, is on our page on AI and machine learning classes in Hong Kong.
Junior secondary students in publicly-funded schools meet AI in a module of 10 to 14 hours, which EDB circular 109/2023 asks schools to allocate. It introduces ideas such as computer vision and AI ethics; it does not train models from data.
A machine learning course takes over where that stops: the student builds the models the module describes. Younger learners may prefer our AI course for teens in Hong Kong as a first step.
Clean a real dataset, choose a sensible model, split data honestly, report accuracy with its caveats, and explain the mathematics of the model in plain English to someone who has never seen it.
That last skill is the one interviewers and university tutors notice. A certificate of completion from us records the course; it is not a university or HKEAA qualification.
English and timing
Because the papers, library documentation and forums of machine learning are written in English, and because a mathematics gap is easiest to close when the mentor is teaching only you.
Weight, bias, loss, overfitting, gradient: these words appear in English in every tutorial and error message. Learning them in English from the first lesson saves a translation step for good.
Our mentors speak at a steady pace and write each new term in the chat. Local-school students gain English practice in a subject they enjoy; international-school students simply carry on in their usual language.
In a group, the student missing the dot product stays quiet and falls behind. In a private lesson the mentor sees the hesitation, stops, and teaches it then and there.
Lessons also bend around school tests, DSE mocks and work deadlines, with no class to wait for.
| Hong Kong time | India time | Often chosen by |
|---|---|---|
| 7:00 pm, weekday | 4:30 pm | Secondary students after dinner |
| 9:30 pm, weekday | 7:00 pm | Adults after work |
| 2:00 pm, Sunday | 11:30 am | Families at the weekend |
Hong Kong runs on UTC+8 and India on UTC+5:30, with no daylight saving in either, so India is two and a half hours behind all year. These hours are examples from our own arithmetic, not a set schedule.
Progress
Our own stages, used to place learners and in the monthly notes. They are not set or recognised by any school, exam board or university.
| Stage | The learner can | Maths they can explain |
|---|---|---|
| 1. Describe data | Summarise and chart a dataset honestly | Mean, median, standard deviation |
| 2. Fit | Train a line and read its error | Gradient, squared error |
| 3. Classify | Build a perceptron and say when it fails | Dot product, separating line |
| 4. Evaluate | Split data and report results with caveats | Conditional probability, rates |
| 5. Scale | Work with many features at once | Vectors and matrices |
| 6. Network | Train a small network and explain each step | Derivatives, the chain rule |
A model that fails clearly teaches more than one that works by luck.
If you cannot say what the weights mean, slow down.
Monthly notes list the models built and the maths learned, with the code attached.
In exam years, we plan lighter months with you in advance.
More courses
All are live and in English; Hong Kong learners take every one of them one to one.
MALE / BASE / 01
From first program to files, functions and classes.
Open the syllabusMALE / BASE / 02
Averages, chance and slopes met through programs.
Open the syllabusMALE / BASE / 03
Exam-focused support for the core and either module.
Open the syllabusMALE / MATH / 01
From summaries to distributions and hypothesis tests.
Open the syllabusMALE / MATH / 02
Calculus and linear algebra at university pace.
Open the syllabusMALE / MATH / 03
For Diploma students building the same foundations.
Open the syllabusMALE / PRAC / 01
Messy data cleaned and charted before modelling.
Open the syllabusMALE / PRAC / 02
End-to-end projects on real, imperfect data.
Open the syllabusMALE / PRAC / 03
Training, scaling and shipping larger models.
Open the syllabusHow classes run
Any day, any time, flexible: one to one at the hour that suits your family, weekdays or weekends. The learner joins from Hong Kong; the mentor teaches from India, where the clock reads two and a half hours earlier.
Evening
Seven in Hong Kong; half past four for the mentor.
Late
Half past nine in Hong Kong is seven in India.
Weekend
A Sunday afternoon, or any weekend hour you prefer.
New ideas are worked on the whiteboard before any library.
Learners say what the model will do before training it.
Each model is pushed until it breaks, then explained.
Lessons lighten around tests and DSE mocks.
Later projects use a dataset the learner picks.
The same person from the first class to the project.

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

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

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

Web app
A weather forecasting site with live conditions for any location.
Fees
Billing is month by month: you pay for the coming month's classes and nothing further ahead. The amount appears in Hong Kong dollars, and the payment page lists any gateway charge on its own line before you agree to pay.
Free first class
Free
no card required
One to one
$1,200 HKD
a month, eight live classes
What families say
Students and parents in their own words, as posted on Google.
★★★★★
"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
Questions from Hong Kong
English. Lessons are live over video with a mentor based in India who writes technical words in the chat as they come up. We do not teach in Cantonese or Mandarin.
Yes. Every Hong Kong learner is taught alone with one mentor, so the pace and the mathematics follow that learner.
Any day, any time, flexible: one to one at the hour that suits your family, weekdays or weekends. India is two and a half hours behind Hong Kong all year, so a 9:30 pm lesson is 7 pm for the mentor.
No. Most of our learners have neither. The mentor teaches the statistics, vectors, matrices and calculus that the course needs as each one comes up.
Both help in different ways: M2 holds the vectors and matrices, M1 the probability distributions and Bayes. We describe what each contains; the subject choice is for the student and the school.
Yes, through the teen course, which starts with Python and introduces only the maths each model needs. Younger children usually start with a general AI course first.
We teach programming and problem-solving with our own exercises. We do not write, edit or complete any assessed work, including the DSE ICT School-based Assessment.
No. We are independent and have no affiliation with the Education Bureau, the HKEAA or any university. We read their documents to know what learners have already studied.
One month at a time, shown in Hong Kong dollars, with no prepayment for a term. Any gateway charge appears before you confirm, and the first class costs nothing.
Learners who complete a course receive a Modern Age Coders certificate of completion. It is our own record, not an official qualification.
Related
Useful next reads before choosing.
Our broader Hong Kong ML page.
Every course for Hong Kong learners.
The four papers and the 2027 dates.
Models built without libraries.
From raw data to a working model.
Ideas for a first real project.
Part of the guide: Every Hong Kong page
More guides: Coding and AI classes in Hong Kong · 中文:英文授課編程課程 · Start here: Online coding for kids · Coding subjects and courses: App development · By age and school level: Adults · 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
In the free class you train the perceptron on this page, then watch it fail on XOR and talk through why. The mentor runs a short, relaxed maths check and suggests where on the path you should begin.
Want to see the format first? Read how we teach or open any syllabus in the course list.
WhatsApp us · +91 91233 66161 · connect@modernagecoders.com
Live online, one to one, in English, with mentors in India. WhatsApp reaches us fastest from Hong Kong.
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