/en-tutor-prep-s3-term2-ict-functions/
/en-tutor-prep-s3-term2-ict-functions/
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 2 | ICT: Functions – Tutor Lesson Plan | 45-minute flow, teaching script, common errors, practice with answers

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

  • 2026-11-30

Lesson prep guide · S3 Term 2 ICT

Students write the same formula three times without wrapping it in a function, then confuse returning with printing. An area function settles parameters, return values and scope.

Lesson objectives Students can (1) define a function with parameters and a return value; (2) state the direction of parameters and returns; (3) give three benefits and explain scope.

01 Prior knowledge check (first 3 minutes)

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

Skill Quick check Pass standard
Multiplication The area of 5 by 3 15
Order Compute first or return first Compute, then return
Variables Can code outside read a variable defined in a function No, it is local

02 Lesson flow (45 minutes)

Time Stage Tutor does Student does
0–5 min Opening: three identical formulas Compute an area three times and ask for a faster way Say wrap it in a function
5–14 min Definition and call Define an area function and call it three times Write one call themselves
14–23 min Parameters and return In goes 5 and 3, out comes 15 Separate in from out
23–32 min Scope Show that a local variable is invisible outside Explain why
32–40 min Benefits and testing Reuse, readability, testability, checked with 5 and 3 Give the three benefits
40–45 min Exit check Collect three answers and sort parameter, return and scope errors Work without notes

03 Teaching script (read it aloud)

Act one: wrapping a job in a name

A function is a named piece of work with input and output. Define an area function taking length and width, compute the product and return it; the main program calls it three times for three areas while maintaining one copy of the code. So the first benefit is reuse, writing the logic once and calling it often. The second is readability, since area(5, 3) says what happens. The third is testability, because a given input has a checkable output and a fix happens in one place.

Most common misconception: that a function must be long to be worth writing. A three-line formula is still worth it for reuse and testing.

Students restate: a function has a name, parameters and a return, and the gains are reuse, readability and testability.

Act two: parameters in, return out

Parameters go into a function and the return value comes out, in opposite directions. The area function receives 5 and 3, computes 15 and returns it, and the call site can store 15 or use it in further arithmetic. Returning differs from printing: printing only displays, while returning lets the program carry on with the value. A function may take zero, one or many parameters but usually returns a single value, and several results need an array or object.

Second misconception: that returning means printing. A printed value is gone, while a returned one can be used upstream.

Students restate: parameters in, return out, and returning is not printing.

Act three: scope and testing

A variable defined inside a function exists only there, which is scope. That keeps functions from interfering, but it means results must travel back by return. Testing is then simple: give an input and check the output, so the area function should give 15 for 5 and 3, and 100 for 10 and 10. An average function can be tested with 12, 18, 25, 30 and 15, totalling 100 over 5 for 20. If the output is wrong, check the parameter order first, then whether the return was written.

Students restate: scope stays inside, and testing compares input with output.

04 Question types and steps

Type Example Steps Answer
Definition An area function with two parameters Multiply and return area(5, 3) gives 15
Direction Parameters against return In and out Opposite directions
Scope Is a local variable visible outside Only inside No
Testing Average of five numbers Total over count 20
A function takes parameters, computes, and returns one valueparameters: 5 and 3function: area5 × 3returns 15reusecalled three timesreadablethe name says the jobtestableone input, one output

A function wraps a piece of work, gives it a name and parameters, and can be reused. An area function receiving length and width computes and returns one value; calling it three times replaces three copies of a formula with one piece of code to maintain. Parameters go in and the return value comes out, and variables inside the function exist only there, which is scope. The gains are reuse, readability and testability.

Sanity check (must teach):Inputs and outputs agree: 5 times 3 is 15, 10 times 10 is 100, and 12, 18, 25, 30 and 15 total 100 over 5 for 20. The reuse sum makes sense, since three calls replacing three-line formulas save nine lines in exchange for one definition and three calls. Parameter counts must match the definition, and a single return means several results need packaging.

05 Three independent practice questions

Question Answer What to observe
An area function receives 5 and 3: what does it return? 5 times 3, which is 15 8 adds instead of multiplying
How does returning differ from printing? Returning lets the caller use the value; printing only displays “They are the same” misses the difference
Can code outside read a variable defined inside a function? No, scope is local Yes means scope is not understood

06 Common errors and correction lines

Error Student usually writes Tutor says
Return as print “Returning just prints the result” “Printing displays; returning hands the value back for further use.”
Parameter order “area(3, 5) and area(5, 3) differ” “Multiplication commutes, but subtraction and division do not, so pass in the defined order.”
No return “Computing is enough, no need to return” “Without a return the caller gets nothing, so the work is wasted.”
Scope confusion “A variable set inside is readable outside” “Local variables stay inside; use the return value to get results out.”

07 Homework (paper and question numbers)

08 Exit check (last 3 minutes)

Question Answer Verdict
Name the three benefits of functions Reuse, readability, testability “Convenient” is too vague; reteach act one
Which way do parameters and returns flow? Parameters in, return out The same direction is a confusion; reteach act two
Is a local variable visible outside? No, scope stays inside Yes means scope is unclear; reteach act three

09 Tutor FAQ

Which year is this page for?

S3 Term 2, the functions unit in local secondary ICT; later years add recursion and modular design.

Is 45 minutes enough for definition and scope?

Yes. Nine minutes on definition, nine on parameters and returns, eight on scope and nine on benefits 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 →