Sparklabs Learning
ClassesSearchPrintable packs
Back to SS 3 First Term
Full packLearner notesTeacher plansCurriculum onlyInclude all weeks

Sparklabs Learning / Digital Technology

SS 3 First Term

Week 2: Advanced Programming

School
Creative Brains Academy
Subject
Digital Technology
Pack
Curriculum only
Prepared
7 November 2026

Week index

  1. 01Senior Review and Computational Problem Solving
  2. 02Advanced Programming
  3. 03Functions, Arrays and Data Structures
  4. 04Object-Oriented Programming
  5. 05Database Systems
  6. 06Computer Networks and Internet Technologies
  7. 07Web Development and Web Design
  8. 08Software Development Life Cycle
  9. 09Electronic Commerce
  10. 10Cyber Security and Emerging Digital Technologies
  11. 11Revision
  12. 12Examination

Week 2 / First Term

Advanced Programming

Monday 14 September 2026 to Friday 18 September 2026

Curriculum outline

Lesson objectives

By Friday, candidates should be able to:

  1. Trace a validated while loop.
  2. Handle ValueError with try and except.
  3. Convert input with float().
  4. Compute subtotal, VAT and total.
  5. Test text and negative input.

Key vocabulary

  • Iteration: one pass through a loop.
  • Validation: checking input against an accepted rule.
  • Exception: an error raised during execution.
  • Accumulator: a variable holding a running total.
  • Cast: converting a value between types.

Common misconceptions

  • "A while loop always runs once." It runs zero times when the condition starts false.
  • "input() returns a number." It returns text; float() converts it.

Teacher activities

  1. Starter: trace a three-step loop.
  2. Teach read, convert, test, accept.
  3. Model try and except.
  4. Build the receipt program.
  5. Run five test inputs.
  6. Collect error logs.

Student activities

  1. Complete the starter trace.
  2. Copy the four-step order.
  3. Force one ValueError.
  4. Assemble the program.
  5. Record five outputs.
  6. Add a discount above 2000.
total = 0
count = 0
while count < 3:
    try:
        price = float(input("Price: "))
    except ValueError:
        continue
    if price > 0:
        total = total + price
        count = count + 1
print("Subtotal:", total)
print("VAT:", round(total * 0.075, 2))
print("Total:", round(total * 1.075, 2))

Expected output for 500, abc, -20, 250, 1000:

Subtotal: 1750.0
VAT: 131.25
Total: 1881.25

Practical / learning evidence

ss3_receipt_bello.py accepts three positive prices and ignores text and negatives. The comment block records one valid, one text and one negative test with the observed line.

Resources and preparation

Python 3, IDLE, projector and printed test scripts. Offline route: hand-trace the code and write the three output lines.

Assessment for learning

Marks go to the condition, rejection branch and rounding. Watch for the counter incrementing early.

Inclusion and homework

Provide the print lines; extend others to a bulk discount. Homework: trace 100, 0, 200, text, 300.

Sparklabs Learning / SS 3 First Term / Curriculum only

Lesson content is provided for classroom planning. Adapt timings and tasks to the approved school calendar and available devices.

Sparklabs Learning

Digital Technology lesson notes and teaching plans for JSS 1 to SS 3.

Curriculum

Open educational resources for JSS 1 to SS 3 Digital Technology.

Quick links

Search the curriculumBrowse classesPrintable term packs

Academic session 2026 / 2027