Trace the code
"What does this print?" Follow a short program line by line and track every variable. Loops, nested conditions and recursion are the usual traps.
Programming exams
The short answer
Practise the way you will be tested. Trace short programs by hand and predict their output, write small functions from a blank page with no notes or AI, and do past papers with a timer. Start with the topics you found hardest during the course, not the ones you already like. Reading your notes again feels productive but is the weakest way to prepare.
Programming exams catch out students who understood every lecture, because recognising code is easier than writing it under time. This is the plan ZAM Academy mentors use with university and college students in the weeks before an exam.
Two private classes, no card. Updated 24 November 2026 by Azzam Makki, founder of ZAM Academy.
What exams test
Your course's past papers show the exact mix. Most draw on these.
"What does this print?" Follow a short program line by line and track every variable. Loops, nested conditions and recursion are the usual traps.
Reverse a list, count words, find the largest value, check a password. Small, complete functions written from nothing, often without an editor.
Code that almost works. Off-by-one errors, wrong conditions and a variable updated in the wrong place come up again and again.
What a class is, why recursion needs a base case, the difference between a list and a dictionary. Short answers in your own words.
In later modules: choose a data structure for a problem, sketch classes, or say how the running time grows with the input (Big O).
A two-week plan
About an hour a day. Move the days around your other exams and keep the order.
Day 1
Get two or three past papers and the topic list. Mark each topic green, amber or red for how confident you are writing code for it, not reading it.
Days 2–6
For each one: rewrite the lecture example from a blank page, then do three small exercises on it. If you get stuck, find the exact line you do not understand before looking anything up.
Days 7–9
Twenty minutes a day predicting the output of short programs on paper, then checking them. Then take working code, break it on purpose, and fix it.
Days 10–12
One full paper a day in exam conditions: timer on, notes closed, no AI, on paper if your exam is on paper. Mark it honestly and redo every question you lost marks on.
Day 13
Pick ten lines from code you wrote and say what each one does, to a friend, a tutor or yourself. Any line you cannot explain is your last revision topic.
Day 14
Skim your mistakes list and one short exercise per topic. Stop early. Tired brains trace code badly.
Exams on paper
Many courses still test programming on paper, with no editor to catch your mistakes.
Writing code on paper is slower and feels different. Do your past papers by hand, not in an editor, so the exam is not the first time.
With no red underline, missing brackets, colons and semicolons cost marks. Reread each answer once only for syntax.
Write the steps in plain English before the code, and leave space between lines for corrections. Markers often give credit for a clear approach.
You cannot look up how to split a string or sort a list. Know the handful of built-in functions your course uses most.
The night before
Sometimes, if you already understood most of the course and only need to refresh it. If you have not been writing code during the term, one night is rarely enough, because the skill an exam tests is writing code quickly, and that only comes from practice.
If one night is all you have, do one timed past paper first, then spend the rest of the time on the questions you could not do. Skip rereading notes. Sleep matters more than one more hour of revision.
And if you are already behind with weeks to go, start the two-week plan now, and get someone to review your code as you go. That is what a mentor is for. It is not for writing the work you will submit.
Questions
Use past papers to see what is tested, practise the hardest topics first, trace short programs by hand, write small functions from a blank page, and do at least one full paper under timed exam conditions.
The idea that a small set of concepts covers most of what you use. For an exam, that usually means variables, conditions, loops, functions, lists or arrays, strings and basic classes. Get those fluent before the harder topics.
For studying, yes: ask it to explain an error, quiz you, or give hints instead of answers. Then close it and write the code yourself, because most programming exams are taken without AI. Follow your course's rules on AI for graded work.
The same plan works for any language. Language-specific traps are worth extra practice: types and classes in Java, pointers and memory in C, indentation and mutable lists in Python.
Only if you have been writing code all term. The exam tests a practised skill, not a set of facts, so last-minute reading helps much less than in other subjects.
Yes. A mentor finds your weak topics, sets practice on them, reviews your code and has you explain it without AI, one to one in your time zone. A mentor never sits an exam or writes work you will submit for a grade.
Keep reading
Start with two free classes
The first class maps your goal, level and weekly hours. The second is a real coding session with feedback. Then your mentor recommends one plan, and you decide.