/en-tutor-prep-s3-term1-ict-programming-basics/
/en-tutor-prep-s3-term1-ict-programming-basics/
General Inquiry: info@TutorZone.com.hk
Office Hours: Monday to Saturday - 9:00 AM to 6:00 PM
WhatsApp Monday to Sunday - 24 hours
Hotline: +852 6828 1809
Instant Support: +852 9061 3106

S3 Term 1 | ICT: Programming Basics – Tutor Lesson Plan | 45-minute flow, teaching script, common errors, practice with answers

S3 Term 1 | ICT: Programming Basics – Tutor Lesson Plan | 45-minute flow, teaching script, common errors, practice with answers

  • 2026-11-30

Lesson prep guide · S3 Term 1 ICT

Students can copy a program but cannot say why it is written that way, and one changed input breaks it; they also mix up syntax and logic errors. This lesson splits a program into input, process and output, then proves each step with a trace table.

Lesson objectives Students can (1) describe a program as input, process and output; (2) tell compiled from interpreted execution; (3) trace variables step by step and separate syntax from logic errors.

01 Prior knowledge check (first 3 minutes)

If any item below fails, fix it first, or this lesson stalls:

Skill Quick check Pass standard
Order of operations What is 3 plus 4 times 2 11, multiplication first
Variables After x equals 3, what does x equal x plus 4 give 7, the right side is computed first
Percentages What is 5 out of 1000 as a percentage 0.5 per cent

02 Lesson flow (45 minutes)

Time Stage Tutor does Student does
0–5 min Opening: a vending machine Ask what happens between the coin and the can Say input, process, output
5–14 min Three parts, four steps Move from input-process-output to write, translate, run, test Put the four steps in order
14–24 min Compiled and interpreted Compare whole-file and line-by-line translation with two languages each State the biggest difference
24–33 min Variable trace Model x equals 3, x equals x plus 4, x equals x times 2 Trace a swap of a and b themselves
33–41 min Errors and testing Show a missing bracket against averaging with a sum Classify the two errors
41–45 min Exit check Collect three answers and sort concept, translation and trace errors Work without notes

03 Teaching script (read it aloud)

Act one: every program is input, process, output

A vending machine is the clearest example: coins and buttons are input, taking payment and calculating change is process, dropping the can is output. A program is the same, so before writing a line ask three questions: what data comes in, how is it processed, what comes out. For five marks the input is five scores, the process is adding and dividing by five, the output is the mean. Write that skeleton in pseudocode first and only then pick a language and type syntax; students who type first discover halfway that they never decided the output.

Most common misconception: that programming is memorising syntax. Syntax is the last layer; a syntax error can be looked up, a logic error cannot.

Students restate: decide input, process and output first, then choose the language and write syntax.

Act two: compiled and interpreted, two ways to translate

Computers only read machine code, so every language is translated. A compiled language translates the whole source file once before running, as C and Java do; it runs fast but one syntax error stops the build. An interpreted language translates and runs line by line, as Python and JavaScript do; one edited line can rerun at once, which suits learning and debugging, at the cost of speed. Both go through the same four steps: write the source, translate, run, test. Running is not the same as being correct, and testing is step four.

Second misconception: that interpreted code is not translated. It is, just spread out one line at a time.

Students restate: compiled translates everything once, interpreted line by line, and both must be tested.

Act three: a trace table turns code into values

The trace table is the most useful tool here. Set x to 3 and x is 3; then x equals x plus 4 computes 7 on the right and stores it, so x becomes 7; then x equals x times 2 makes it 14. The common slip is to keep using 3 in the third line. Swapping works the same way: a is 2 and b is 5, then t equals a, a equals b and b equals t leaves a as 5 and b as 2, while dropping t overwrites one value. Testing needs different inputs: 12, 18, 25, 30 and 15 total 100, so the mean is 20.

Students restate: compute the right side first, and swapping needs a third variable.

04 Question types and steps

Type Example Steps Answer
Three parts Averaging five numbers Input five, total and divide, output the mean Input, process, output
Execution Which kind is Python Line-by-line translation at run time Interpreted
Trace x equals 3; x equals x plus 4; x equals x times 2 Update x at each line 14
Error type A missing closing bracket The machine cannot read it Syntax error
Four steps of writing a program, and compiled against interpreted executionWrite source codeTranslate to machine codeRunTest and debugC, JavaCompiled: the whole file is translated once, then runs directlyevery syntax error must be fixed at compile timefixed at compile timePython, JavaScriptInterpreted: translated line by line as it runsthe source needs an interpreter on that machineedit one line and rerun

A program is input, process, output, but building one takes four steps: write the source, translate it, run it, test it. A compiled language translates the whole file once, which is fast but stops at the first syntax error; an interpreted language translates line by line, so one edited line can run again at once, slower but better for learning and debugging. A syntax error is something the machine cannot read, such as a missing bracket; a logic error is readable but wrong, such as averaging with a sum, and only testing catches it.

Sanity check (must teach):Every trace row must show the value at that moment: 3 plus 4 is 7 and 7 times 2 is 14, while 6 means 3 was multiplied, using the old value. A swap takes three assignments: with a as 2 and b as 5, writing a equals b then b equals a leaves both at 5. A mean divides the total by the count, so 100 over 5 is 20, not over 4 or 6. Fahrenheit to Celsius is F minus 32, times 5, over 9, so 77 becomes 25. An error rate uses the divisor: 5 in 1000 lines is 0.5 per cent, not 5.

05 Three independent practice questions

Question Answer What to observe
x equals 3; x equals x plus 4; x equals x times 2: what is x? 3 plus 4 is 7, 7 times 2 is 14 6 means the third line reused 3 instead of the updated value
What is the mean of 12, 18, 25, 30 and 15? The total is 100, over 5, so 20 25 picks the middle value; 100 forgot the division
Convert 77 Fahrenheit to Celsius (77 minus 32) times 5 over 9, which is 25 45 subtracts 32 but skips the scaling

06 Common errors and correction lines

Error Student usually writes Tutor says
Typing before thinking “I do not know the output yet, I will work it out later” “Fix input, process and output first, or you will rewrite halfway.”
Interpreted needs no translation “Python runs directly, the computer understands it” “Computers read machine code; interpreted code is translated line by line before each line runs.”
Skipping a trace row “After x plus 4 I still multiply 3 by 2” “x is already 7, so the third line multiplies 7; every row records the value at that moment.”
Swap without a third variable “a equals b then b equals a swaps them” “Use t equals a, a equals b, b equals t, or the first value is overwritten.”

07 Homework (paper and question numbers)

08 Exit check (last 3 minutes)

Question Answer Verdict
What is the biggest difference between compiled and interpreted? Compiled translates the whole file once, interpreted line by line at run time “One is fast, one is slow” misses the translation model; reteach act two
Which error type is a missing bracket? A syntax error, the machine cannot read it Logic error means the classification is unclear; reteach act three
a is 2 and b is 5; after swapping through t, what are they? a is 5 and b is 2 Both at 5 means the third variable was skipped; reteach act three

09 Tutor FAQ

Which year is this page for?

S3 Term 1, the programming introduction in local secondary ICT; later years move to syntax, arrays and file handling.

Is 45 minutes enough for concepts and tracing?

Yes. Nine minutes on the three parts, ten on compiled against interpreted, nine on tracing and seven on errors and testing, with the rest for practice and the exit check.

Is there a matching worksheet?

Yes. The homework links to questions 1, 4 and 8 of set 1 of the S3 ICT algorithms paper, all with answers.

Find a tutor freeTutor sign-up →

©2026 TutorZone · www.tutorzone.com.hk · Terms of use · All rights reserved. Original TutorZone material for personal study and teaching only; not for resale or republication.

Join as a tutor or coach — academic, music, sports, arts, STEM. Free to register. See how it works →