Sparklabs Learning / Digital Technology
SS 3 First Term
Week 3: Functions, Arrays and Data Structures
- School
- Creative Brains Academy
- Subject
- Digital Technology
- Pack
- Curriculum only
- Prepared
- 7 November 2026
Week index
- 01Senior Review and Computational Problem Solving
- 02Advanced Programming
- 03Functions, Arrays and Data Structures
- 04Object-Oriented Programming
- 05Database Systems
- 06Computer Networks and Internet Technologies
- 07Web Development and Web Design
- 08Software Development Life Cycle
- 09Electronic Commerce
- 10Cyber Security and Emerging Digital Technologies
- 11Revision
- 12Examination
Week 3 / First Term
Functions, Arrays and Data Structures
Monday 21 September 2026 to Friday 25 September 2026
Curriculum outline
Lesson objectives
By the week's close, candidates should be able to:
- Define function, parameter and return.
- Write a function that averages a list.
- Apply append, index and len.
- Store a record in a dictionary.
- Trace two calls.
Key vocabulary
- Function: a named block performing one task.
- Parameter: a variable named in a definition.
- Return value: the result sent to the caller.
- List: an ordered collection read by index.
- Dictionary: a set of key and value pairs.
Common misconceptions
- "A parameter and an argument are the same." The parameter is the name; the argument is the supplied value.
- "Index 1 is always the first item." Python counts from 0.
Teacher activities
- Starter: trace a two-call function.
- Teach definition, call and return.
- Model average(marks) with a guard.
- Extend to append and lookup.
- Set two test lists.
- Review index errors.
Student activities
- Complete the starter trace.
- Label parameters and arguments.
- Type average(marks) and call it twice.
- Append 90 and recalculate.
- Build a three-key dictionary.
- Repair an IndexError.
def average(marks):
if len(marks) == 0:
return 0
return sum(marks) / len(marks)
scores = [62, 48, 71, 55]
print("Average:", average(scores))
scores.append(90)
print("Rounded:", round(average(scores), 1))
student = {"name": "Amaka", "score": 71}
print(student["name"], student["score"])
Expected output:
Average: 59.0
Rounded: 65.2
Amaka 71
Practical / learning evidence
ss3_scores_okoro.py defines average(marks), calls it on two lists, prints one rounded result and reads one dictionary record. Success needs an empty-list guard and two returned values.
Resources and preparation
Python 3, projector and a prepared empty list. Offline route: hand trace both calls beside the printed code.
Assessment for learning
Inspect the guard, the division and both calls. Award marks for argument order and dictionary access.
Inclusion and homework
Supply the function header; extend others to a highest(marks) function. Homework: write lowest(a, b, c) with one test call.