/en-tutor-prep-s3-term1-ict-variables/
/en-tutor-prep-s3-term1-ict-variables/
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: Variables – Tutor Lesson Plan | 45-minute flow, teaching script, common errors, practice with answers

S3 Term 1 | ICT: Variables – 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 write x equals 5 but cannot say why changing a later leaves b alone, and they mix 5 with 5.0 and “5”. This lesson uses the labelled box, clearing naming rules, types and copying in one pass.

Lesson objectives Students can (1) judge whether a variable name is legal and say why; (2) tell integer, float and string apart; (3) explain that assignment copies a value rather than linking, and predict the other name after one changes.

01 Prior knowledge check (first 3 minutes)

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

Skill Quick check Pass standard
Spelling The English word for a total mark total, joined with an underscore as total_score
Numbers and text How 5 differs from “5” One computes, the other is text
Order After a equals 5 then b equals a, what is b 5, the value at the time of copying

02 Lesson flow (45 minutes)

Time Stage Tutor does Student does
0–5 min Opening: three sticky boxes Show three boxes labelled a, b and c with a card in each Describe the relation between name and value
5–15 min Naming rules Give three rules and test four legal and three illegal names Judge five names themselves
15–24 min Three types Show 5, 5.0 and string 5 with output and what adds Label each value with a type
24–33 min Assignment copies Model a equals 5, b equals a, a becomes 7, and trace b Predict the result of a second set
33–40 min Precision and habits Show 0.1 plus 0.2 is not 0.3, and why names should mean something Explain why rounding is needed
40–45 min Exit check Collect three answers and sort naming, type and copying errors Work without notes

03 Teaching script (read it aloud)

Act one: a variable is a labelled box

Think of a variable as a box with a name on it: you write the name and the value sits inside. Naming has three rules: start with a letter or underscore, then allow letters, digits and underscores, and no spaces or reserved words. So age, total_score, _temp and score2 are legal; 2score fails on the leading digit, total score fails on the space and class is reserved. Names should carry meaning: total_score beats t three months later.

Most common misconception: that Chinese names work. Most beginner environments reject them, and typos are harder to spot, so use English and underscores.

Students restate: letter or underscore first, no spaces, no reserved words, and names should mean something.

Act two: three types, visible in the notation

A type decides what a value can do. 5 is an integer and adds and multiplies; 5.0 is a float and keeps decimals in results; “5” in quotes is a string that only joins and cannot add a number. The same digit has three identities but only the first two compute: 5 plus 2 is 7, 5.0 plus 2 is 7.0, and “5” plus 2 raises an error until it becomes int(“5”) plus 2, which is 7. Floats also carry error, since 0.1 plus 0.2 is 0.30000000000000004, so round to two decimals before comparing.

Second misconception: that 5 and 5.0 are the same. The value matches, but the type and the output differ, and division differs more.

Students restate: integer, float and string, and only the first two compute directly.

Act three: assignment copies rather than links

Assignment copies the value on the right into the box on the left. With a equals 5, a holds 5; then b equals a puts another copy of 5 in b; changing a to 7 later leaves b at 5, because the boxes are independent. It is not b pointing at a, which is the common mistake. Chained a equals b equals 3 puts 3 in both, and changing a afterwards still leaves b alone. Swapping needs a third box: t equals a, a equals b, b equals t. To test, deliberately change one name and see whether the other moves.

Students restate: assignment copies the value at that moment, and two names are two independent boxes.

04 Question types and steps

Type Example Steps Answer
Naming Why 2score is illegal It starts with a digit Illegal; use score2
Type 5, 5.0 and string 5 Look for a decimal point and quotes Integer, float, string
Copying a equals 5; b equals a; a becomes 7 b keeps the copied value b is still 5
Precision Is 0.1 plus 0.2 equal to 0.3 Floats carry representation error No; compare after rounding
A variable is a labelled box: renaming is legal, assigning changes one boxLegal: starts with a letter or underscore, may hold digits, no spacesageoktotal_scoreok_tempokscore2okIllegal: starts with a digit, contains a space, or is a reserved word2scoreillegaltotal scoreillegalclassillegala equals 5; b equals a; then a becomes 7, and b stays 5two names are two boxes; the value is copied, not linked

Variable names follow three rules: start with a letter or underscore, digits allowed later, no spaces, and no reserved words such as class. So age, total_score, _temp and score2 are legal, 2score fails on the leading digit, total score fails on the space and class is reserved. Assignment stores the right side in the left box: a equals 5, then b equals a gives b the value 5; changing a to 7 later leaves b at 5, because each name is its own box. Types follow the notation: 5 is an integer, 5.0 a float, “5” a string.

Sanity check (must teach):Naming rules check against counter-examples: change the first character of 2score to s and score2 is legal; replace the space in total score with an underscore and total_score is legal. Types check against output: 5 plus 2 is 7, 5.0 plus 2 is 7.0, and “5” plus 2 fails until int(“5”) plus 2 gives 7. Copying checks by trace: after a equals 5, b equals a and a becomes 7, b is still 5, and b turning 7 would mean assignment was read as a link. Precision shows with 0.1 plus 0.2, which is 0.30000000000000004, and rounds to 0.3.

05 Three independent practice questions

Question Answer What to observe
Why is 2score illegal and how would you fix it? It starts with a digit; score2 is legal Saying only illegal, or renaming to score_2 which still starts with a digit
a equals 5, b equals a, then a becomes 7: what is b? b is still 5, the value copied at the time 7 means assignment was treated as a link
Is 0.1 plus 0.2 equal to 0.3? Not exactly; it is 0.30000000000000004, so round before comparing “Equal” ignores float precision

06 Common errors and correction lines

Error Student usually writes Tutor says
Digit first “2score should be fine, it is readable” “Names start with a letter or underscore, so use score2.”
Types confused “5 and “5” are the same, both add” “Quotes make a string, and strings cannot add numbers until int(“5″) converts them.”
Assignment as a link “After b equals a, changing a changes b” “Assignment copies the value, so after a becomes 7, b stays 5; the boxes are independent.”
Comparing floats directly “0.1 plus 0.2 equals 0.3, so test equality” “The sum is 0.30000000000000004, so round to two decimals first.”

07 Homework (paper and question numbers)

08 Exit check (last 3 minutes)

Question Answer Verdict
Give three legal names and one illegal with the reason age, total_score, _temp; 2score starts with a digit No legal example means the rules are missing; reteach act one
What types are 5, 5.0 and string 5? Integer, float, string “All numbers” misses the types; reteach act two
a equals b equals 3, then a becomes 5: what is b? b is still 3 5 means assignment was read as a link; reteach act three

09 Tutor FAQ

Which year is this page for?

S3 Term 1, the variables and types introduction in local secondary ICT; later years cover lists, dictionaries and scope.

Is 45 minutes enough for naming, types and copying?

Yes. Ten minutes on naming, nine on types, nine on copying and seven on precision and habits, with the rest for practice and the exit check.

Is there a matching worksheet?

Yes. The homework links to questions 4 and 8 of set 1 and question 3 of set 2 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 →