Sparklabs Learning / Digital Technology
SS 2 Third Term
Week 5: Python: Practical Mini-Project
- School
- Creative Brains Academy
- Subject
- Digital Technology
- Pack
- Learner notes
- Prepared
- 7 November 2026
Week index
- 01Python: Variables and Data Types
- 02Python: Input, Output and Operators
- 03Python: Selection
- 04Python: Iteration
- 05Python: Practical Mini-Project
- 06E-Commerce: Meaning and Types
- 07E-Commerce: Payment Systems and Safety
- 08Project Work: SDLC and Python
- 09Revision
- 10Examination
Week 5 / Third Term
Python: Practical Mini-Project
Lesson notes
Lesson objectives
By the end of the week, learners should be able to:
- Plan a mini-project combining variables, selection and iteration.
- Write a calculator program taking two inputs and an operator.
- Handle division safely when the divisor is zero.
- Display the chosen result clearly.
- Debug the program if errors appear and confirm the output.
Key vocabulary
- Mini-project: a small applied task exercising multiple skills.
- Calculator: a program accepting operands and an operator.
- Operand: a value entered for calculation.
- Operator: plus, minus, multiply, divide or select.
- Division by zero: attempting to divide by the number zero.
- Safe handling: avoiding crashes on edge cases.
- Display: presenting the computed result.
- Debug: finding and fixing mistakes in a program.
- Confirm: verifying output matches expectations.
Common misconceptions
- "Every operator behaves identically." Division requires special care for zero divisors.
- "Input and operator are optional." Both must arrive from the user to make the program functional.
- "No error handling is needed in a calculator." Division by zero crashes the program.
Teacher activities
- Starter: display a broken calculator and ask where the error appears.
- Explain the mini-project requirement and model planning on paper.
- Demonstrate writing a calculator with input, selection and division handling.
- Demonstrate debugging a division-by-zero error safely.
- Save the program and reopen to confirm the output.
- Close with the combined task and exit question.
Student activities
- Observe the broken calculator and locate where the error appears.
- Explain the mini-project requirement in one paragraph.
- Plan a calculator taking two inputs and an operator.
- Write the calculator with safe division handling.
- Debug any division-by-zero errors and confirm the corrected output.
- Answer the exit question in one sentence about division safety.
Practical / learning evidence
A runnable calculator program handling all five operators safely, plus the confirmed output for normal and division-by-zero cases. Submit both the program and outputs for marking.
Resources and preparation
Computers with the interpreter, blank program windows and sample broken calculators. Prebuild the interpreter in a read-only folder. Disable Caps Lock before typing. Verify the computer starts reliably.
Assessment for learning
Inspect the calculator for all five operators and safe division handling. Check the outputs for sensible calculations including the division-by-zero warning. Ask a learner to describe the division-by-zero check. Flag any learner who lets division by zero crash the program.
Inclusion and homework
Provide the broken calculator prebuilt for learners needing scaffolding and allow extra debugging time. Extend confident learners with three more operators and a second homework extending the calculator to modulus and exponent. Homework: write a second mini-project computing student averages safely with division-by-zero handling.