Hong Kong · HKDSE ICT programming · Python and C++

HKDSE ICT programming help in Python and C++

Programming is the part of DSE ICT that students either love or quietly dread. It runs through Paper 1, fills elective 2C and sits inside the SBA, so avoiding it is not an option. The good news is that the exam asks for a defined, limited set of skills, and they can be learnt. Our mentors teach them in English over a live video link, one to one: the student types, the mentor keeps asking why.

Teaching live since 2020 · 10,000+ students worldwide · Hong Kong students learn one to one, live online, in English

The direct answer

DSE ICT programming uses Python or C++. The EDB guide also lists Pascal for candidates up to the 2027 exam, and from 2028 lists only Python and C++. Modern Age Coders gives HKDSE ICT programming help live and online, one to one in English, at flexible Hong Kong times: data types, loops, arrays, trace tables and testing for Paper 1, then searching, sorting, linked lists, stacks, queues, files and numerical errors for elective 2C, in whichever of the two languages the school teaches. The first class is free.

Courses first

Which course helps most with DSE ICT programming?

Start with the DSE ICT course if the whole subject needs work. If only the coding is weak, the Python or C++ course gives more hours on the language itself. In Hong Kong all three are taught one to one.

The language question

Which programming language does DSE ICT use?

The answer is in an appendix of the EDB's Curriculum and Assessment Guide, in a table headed "Programming Languages Used in Public Examination". It sets the languages by cohort, which is why students and teachers sometimes disagree.

The rule, year by year

For candidates sitting the HKDSE in 2025, 2026 or 2027, the table lists Pascal, Python and C++ for the Compulsory Part and the Algorithm and Programming elective. For 2028 and later, it lists Python and C++ only.

The Databases elective uses SQL in every year, and the Web Application Development elective lists JavaScript and PHP. The guide adds that these languages "will be reviewed from time to time on a need basis".

What the guide really wants

One sentence in the same appendix is easy to miss: "We recommend students to use programming language to implement the learning elements of programming instead of learning Python, Pascal or C++."

In plain words, the language is a tool for learning algorithms, not the goal. Students who learn the ideas carefully can switch languages later; students who memorise syntax struggle as soon as a question is phrased in pseudocode.

Source: Appendix 3 of the EDB's 2021 ICT guide for S4 to S6. The table is read column by column from the text of the PDF; confirm your school's language with the ICT teacher. Read 23 November 2026.

Most of our DSE ICT students learn in Python. Students who prefer C++, or whose school uses it, learn it in full; see C++ classes for teens for that route, or Python for 16 year olds for a gentler start in Python. HKDSE ICT is not a small subject: the HKEAA reports that 6,251 candidates sat it in 2026.

What is expected

How much programming does DSE ICT expect?

More than many students assume, but with clear edges. The EDB guide sets out what the Compulsory Part asks and then what elective 2C adds, and the difference between the two is where most of the hard work lies.

Programming in HKDSE ICT: Compulsory Part (module D) against elective 2C, from the EDB guide
AreaCompulsory Part, module DElective 2C, Algorithm and Programming
Lesson time48 hours: problem formulation 5, algorithm design 12, program development 20, testing and debugging 1138 hours: programming 32 (testing and debugging 4 of these), real-life applications 6
DataInteger, real, character and Boolean; strings and one-dimensional arraysSimple, structured and user-defined data types
ControlSequence, selection and iteration; nested loops not requiredNested loops required
AlgorithmsMinimum, maximum, average, searching a list, counting, checking orderLinear and binary search; bubble, insertion and selection sort; merging two arrays
StructuresLists as one-dimensional arraysLinked lists, stacks and queues built in arrays; text files updated
ErrorsSyntax, logic and run-time errors; boundary cases in test dataRounding, truncation, overflow and underflow; stubs, flags, break points and traces

Source: the EDB's ICT guide of 2021, module D (Computational Thinking and Programming) and option C (Algorithm and Programming), topics, learning outcomes and remarks, summarised by us. Our check: 5 + 12 + 20 + 11 = 48, the guide's module D total.

Read code

The guide asks students to "perform a dry run" and to produce a trace table "to show values of variables at each stage". Reading code accurately comes before writing it.

Fix code

Students must locate a logic error in an algorithm and correct it, and modify an algorithm when the task changes. Small, exact edits, not rewrites.

Write code

Students produce a programming solution for a given problem, with good style: the guide names meaningful variable names, comments, annotations, spacing and indentation.

Paper 1 Section B (33% of the subject) and Paper 2 (25%) both use short and structured questions, according to the HKEAA's 2027 framework, so a large part of the programming credit comes from writing and reading code on paper, under time, without a computer to check it. That is the skill we practise most.

Python and C++

Where do Python and C++ answers differ in DSE ICT?

The algorithms are the same in both languages. The traps are not. These are the differences we see trip students most often, especially those who learnt one language at school and practise in the other at home.

Division

In C++, 7 / 2 is 3 because both values are integers, and -7 / 2 is -3. In Python, 7 / 2 is 3.5; floor division 7 // 2 is 3, but -7 // 2 is -4. A trace table written with the wrong rule gives the wrong answer every time.

Arrays and lists

A C++ array has a fixed size and one type. A Python list grows and mixes types. The elective builds stacks and queues "in terms of arrays", so Python students should practise with a fixed-length list and a size limit, as the exam expects.

Whole-number size

A C++ int has a maximum and can overflow. Python integers do not overflow at all. Questions about overflow are really about fixed-size storage, so Python students need the C++ picture in their heads.

Indexing from zero

Both languages index from 0, but pseudocode in questions may count from 1. Before tracing, the student marks which convention the question uses.

Strings

C++ strings and characters are different types; Python has no separate character type. Extracting characters, which the guide lists as a module D example, looks similar but behaves differently with types.

Input and output

Python reads text and needs int() to turn it into a number; C++ reads into a typed variable. Forgetting the conversion is the classic run-time or logic error in a first program.

Everything on this list is ours: common observations from teaching, not exam statistics. A good habit for either language is to trace a program by hand before running it, then explain any difference out loud. Students who want a wider base in algorithms can work through our data structures and algorithms course.

A sample lesson

What are rounding, truncation, overflow and underflow errors?

The EDB guide names four numerical errors in elective 2C: "rounding errors, truncation errors, overflow errors and underflow errors". They are much easier to remember once a student has caused each one on purpose. This is our lesson that does exactly that, in both exam languages.

  1. Rounding. Add 0.1 ten times and compare with 1.0. The student predicts True. Both languages say no, because 0.1 cannot be stored exactly in binary.
  2. Truncation. Divide 7 and -7 by 2 using whole numbers. The fraction is dropped, but C++ cuts towards zero while Python's floor division rounds down. int(-7 / 2) in Python cuts towards zero again.
  3. Overflow. Put 127 into an 8-bit signed integer and add 1. In C++ it wraps to -128, the two's complement pattern the student already met in Paper 1. Python just prints 128.
  4. Underflow. Divide a very small positive number by ten billion. The true answer is not zero, but it is too small to store, so the computer gives 0.
  5. Explain. For each line of output the student writes one exam-style sentence: what was stored, why it differs from the true value, and which error it is.
Four numerical errors in PythonPython
# Four numerical errors from the 2C syllabus, tried in Python.
# 1. Rounding error: 0.1 has no exact binary form
total = 0.0
for _ in range(10):
    total = total + 0.1
print("rounding:", total, total == 1.0)

# 2. Truncation: dividing whole numbers, and dropping the fraction
print("truncation:", 7 // 2, -7 // 2, int(-7 / 2))

# 3. Overflow: Python whole numbers simply grow
x = 127
print("overflow:", x + 1, 2 ** 31)

# 4. Underflow: a positive number too small to store becomes 0.0
tiny = 1e-320
print("underflow:", tiny / 1e10, tiny / 1e10 == 0.0)

Written by us for this lesson; Python 3 prints the four lines below.

Python outputOutput
rounding: 0.9999999999999999 False
truncation: 3 -4 -3
overflow: 128 2147483648
underflow: 0.0 True

Rounding: ten additions of 0.1 land just short of 1. Truncation: 3, then -4 from floor division, then -3 from int(). Python never overflows its whole numbers, so 127 + 1 is 128 and 2 to the power 31 prints in full.

The same four errors in C++C++
// The same four errors in C++ (compile with -std=c++20).
#include <cstdint>
#include <iostream>
using namespace std;

int main() {
    cout << boolalpha;
    // 1. Rounding error
    double total = 0.0;
    for (int i = 0; i < 10; i++) total = total + 0.1;
    cout.precision(17);
    cout << "rounding: " << total << " " << (total == 1.0) << "\n";

    // 2. Truncation: C++ integer division cuts towards zero
    cout << "truncation: " << 7 / 2 << " " << -7 / 2 << "\n";

    // 3. Overflow: an 8-bit signed integer wraps round
    int8_t x = 127;
    x = x + 1;
    cout << "overflow: " << int(x) << "\n";

    // 4. Underflow
    double tiny = 1e-320;
    cout << "underflow: " << tiny / 1e10 << " " << (tiny / 1e10 == 0.0) << "\n";
}

Our own C++ version, compiled with clang++ in C++20 mode, where converting 128 back into an 8-bit signed integer is defined to wrap round.

C++ outputOutput
rounding: 0.99999999999999989 false
truncation: 3 -3
overflow: -128
underflow: 0 true

The rounding error is the same value as in Python, shown with 17 significant digits. C++ truncates -7 / 2 towards zero, giving -3. The 8-bit integer overflows from 127 to -128. Underflow gives 0 in both languages.

What students take from it

Never test two real numbers for exact equality; check whether the difference is tiny instead. That one rule prevents a whole family of logic errors in programs that handle money or measurements.

Know your language's division rule before tracing anything with negative numbers. In an exam, write the rule beside the trace table so the marker sees it.

Why both languages

Overflow is invisible in Python, so Python students tend to think it is a theory topic. Seeing -128 appear in C++ makes the Paper 1 two's complement work feel real.

The lesson also shows that the same value can be printed differently: Python shows 0.9999999999999999, C++ with 17 digits shows 0.99999999999999989. Same number, different display.

Debugging

How do you debug a DSE ICT program?

The EDB guide is specific: students should "use stubs, flags, break points and program traces with test data set for debugging", and should design test data that includes boundary cases. We teach debugging as a routine with steps, not as luck.

  1. Classify the error. Syntax (the program will not run), run-time (it stops while running) or logic (it runs and gives a wrong answer). Each needs a different search.
  2. Shrink the input. Find the smallest test data that still shows the problem, including the boundary values the guide asks students to identify.
  3. Trace by hand. Write a trace table for that small input. Note the first row where the table and the program disagree.
  4. Add a flag or a print. Confirm the suspicion with one targeted output, or a break point in an editor that supports it.
  5. Stub what is not needed. Replace an unfinished sub-program with a stub that returns a fixed value, so the rest can be tested.
  6. Fix one thing, retest everything. A fix that breaks another case is not a fix. Rerun the whole test set.

How a help session runs

A student brings a topic, not an assignment: "linked lists in arrays", "insertion sort", "file updating". The mentor gives a short task of our own, the student codes it on a shared screen, and the mentor stops at the first unclear line.

Each session ends with two or three questions of our own in the DSE style, done on paper, and a short list of what to practise before next time.

What we do not help with

We do not write, debug or improve code for the SBA. Under the HKEAA's SBA rules, handing in someone else's work, or a chatbot's, as your own is malpractice; we apply the same principle to any graded school task.

If a student brings SBA code, the mentor will not open it and will set an equivalent task on a different topic. For how we keep that line, see how we teach.

Timing

When should a DSE ICT student get programming help?

As soon as code starts to feel like guessing. Programming builds on itself; a weak grasp of loops in S4 becomes a serious problem when stacks and queues arrive in S5.

S4

First programs, data types, selection and loops. A few weeks of one-to-one practice here saves months later.

S5

Arrays, standard algorithms, trace tables and, for 2C students, the first data structures. The busiest year for programming.

S6

Fluency under time: code completion, tracing and error-finding on paper, ahead of the papers on Saturday 17 April 2027 for the 2027 cohort.

Lesson times on the two clocks, as examples
Hong KongIndiaGood for
6:30 pm, weekday4:00 pmAfter school and a snack
9:30 pm, weekday7:00 pmLate programming practice
2:00 pm, Sunday11:30 amA longer debugging session

Our own conversions. Hong Kong runs on UTC+8 and India on UTC+5:30 throughout the year, with no daylight saving in either, so a Hong Kong lesson is always 2 hours 30 minutes later on the clock than the same moment in India.

Students who also want to see where programming leads after the DSE can look at AI and machine learning classes in Hong Kong.

Progress

How do we track progress in DSE ICT programming?

Our own stages, shared with parents. They describe skills, not HKEAA levels.

Programming stages we use with DSE ICT students
StageThe student canEvidence
1. SyntaxWrite short programs without looking up every lineSmall tasks finished inside the lesson
2. TraceProduce a correct trace table for loops and arraysHand traces that match the run
3. TestChoose normal, boundary and invalid test dataA test list written before coding
4. StructureBuild stacks, queues and linked lists in arraysWorking structures in the school's language
5. ErrorsName and explain the four numerical errorsExam sentences, as in the sample lesson
6. Paper fluencyComplete and correct code on paper under timeTimed sets with fewer slips each week

For students

If you cannot trace it, you do not yet understand it.

Never compare two real numbers with ==.

For parents

The mentor sends a monthly summary of programming topics covered and next steps.

Ask your child to explain one bug they fixed this week.

More courses

Nine more courses for students who code

Every course is live and in English; for Hong Kong, every one is one to one.

I

Programming depth

Ages 13 to 18

HIPP / PD / 01

Problem Solving for Teens

Logic and data structures, step by step.

Open the syllabus

HIPP / PD / 02

Competitive Programming for Teens

Algorithms under contest time.

Open the syllabus

HIPP / PD / 03

Java for Teens

A third language with strict types.

Open the syllabus
II

The other electives

Ages 13 to 18

HIPP / EL / 02

JavaScript for Teens

Scripts for the Web elective.

Open the syllabus

HIPP / EL / 03

Git and GitHub for Teens

Keeping versions of your own code.

Open the syllabus
III

Code with AI, carefully

Ages 13 to 18

HIPP / AI / 01

Vibe Coding for Teens

AI-assisted projects where the teen reads every line.

Open the syllabus

HIPP / AI / 02

AI and Machine Learning for Teens

Python models from data to results.

Open the syllabus

HIPP / AI / 03

Data Science for Teens

Analysing real tables with Python.

Open the syllabus

How lessons run

What does a programming lesson feel like from Hong Kong?

Any day, any time, flexible: one to one at the hour that suits your family, weekdays or weekends. The mentor teaches over video from India, 2 hours 30 minutes behind Hong Kong, and both of you work in one shared code editor.

Early evening

Half past six in Hong Kong is 4 pm in India.

Late evening

A 9:30 pm Hong Kong lesson is 7 pm for the mentor.

Sunday afternoon

2 pm in Hong Kong, 11:30 am in India.

Student types

The student writes the code; the mentor asks questions.

Paper too

Every session includes tracing on paper.

Two languages

Python or C++, matched to the school.

Our own tasks

Exercises are written by us, never copied from papers.

Test first

Test data is chosen before the code is run.

No graded work

SBA code is never opened in a lesson.

Student work

Projects by our students

Programs built by students on our longer courses; there are more on student labs.

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 one-to-one programming help

We bill per month, for that month alone, so there is nothing to pay in advance beyond it. The card below is in Hong Kong dollars, and if the payment gateway adds a charge you see it itemised before paying.

Free first class

Free

no card required

  • A free first class on the topic your child finds hardest
  • A short tracing and coding check
  • No card needed to book
Book it

One to one

$1,200 HKD

a month, eight live classes

  • A mentor fluent in Python and C++
  • Compulsory Part and elective 2C programming
  • Lesson times that fit your week
Start here

What families say

Rated 4.9 across 547 Google reviews

From Google reviews, in the words of the parents and students who wrote them.

★★★★★

"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 families

DSE ICT programming help: questions and answers

Does DSE ICT use Python?

Yes. The EDB guide lists Python and C++ for every HKDSE year from 2025, with Pascal also listed up to 2027. From the 2028 exam only Python and C++ are listed. Check your school's choice with the ICT teacher.

Is Python or C++ better for DSE ICT?

Neither scores higher by itself; the exam tests algorithms, not a language. Python is shorter to write, C++ makes fixed-size storage and overflow more visible. We usually advise using the school's language and learning to read the other.

Can my child switch from C++ to Python in S5?

Many can, because the ideas carry over. The risky parts are division, arrays versus lists and input conversion. A few one-to-one lessons on those differences usually make the switch safe. Agree it with the school first.

Are lessons in English?

Yes. Lessons are live, online and taught in English by mentors based in India. Code keywords and error messages are English anyway, so the language helps rather than hinders. We do not teach in Cantonese or Mandarin.

Are lessons one to one?

Yes, always. Hong Kong students are taught one to one only, so the session follows one student's code and questions from start to finish.

When are lessons?

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

Can you debug my SBA program?

No. In the HKEAA handbook, SBA work produced by another person or by an AI tool and passed off as the student's counts as malpractice. We teach debugging on our own tasks and never touch SBA code.

Can my child use ChatGPT to learn programming?

OpenAI does not offer ChatGPT in Hong Kong, and its terms set a minimum age of 13 with a parent's permission under 18. With an AI tool the school provides, the same rule holds: used to explain an error message it can help; used to write code it stops the learning, and on the SBA it is malpractice. In our lessons the student writes every line.

Do you use past-paper questions?

We write our own practice questions in the DSE style. Students may also practise with HKEAA past papers they have bought, and we help them review their own answers.

How are fees paid?

Monthly, in Hong Kong dollars as shown on the fee card, with no prepayment. Any gateway charge is shown before you pay. The first class is free.

Related

More for Hong Kong students learning to code

Further pages on the same path.

Every Hong Kong class

Coding, AI and maths in Hong Kong.

HKDSE ICT course

The full ten-month plan.

C++ classes for teens

The C++ route in depth.

Data structures and algorithms

Beyond elective 2C.

AI and machine learning in Hong Kong

Python after the DSE.

How we teach

Inside a live lesson.

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 · By age and school level: Adults · 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 DSE ICT programming class

In the free class your child writes and traces a short program in the school's language, and the mentor finds the first idea that wobbles. You leave with a plain account of what to fix first.

Read more first? See how we teach or the HKDSE ICT course page.

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

Live, online and one to one, in English, with mentors based in India. A WhatsApp message gets the quickest reply.

Free. No card, nothing to sign.

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