- Explain debugging and tracebacks.
- Apply today's ideas in a small Python program.
- Inspect output and improve the program after a test run.
- debugging
- tracebacks
- problem decomposition
- review
Review by tracing small programs: identify inputs, transformations, and outputs. A traceback is evidence, not a failure. Demonstrate the profile programme and give useful feedback to a peer.
Before coding, describe the input, processing, and output in ordinary language. Run the smallest possible version, then extend it one change at a time. Read the error message before asking for help.
first = float(input('First number: '))
second = float(input('Second number: '))
print(f'Sum: {first + second}')Build addition and subtraction, then test with decimals.
Add multiplication and handle a zero divisor before adding division.
Submit profile plus a four-operation calculator.
The calculator prints labelled results for valid inputs.
Write a reflection: one error fixed and one concept to practise.
- Official Python documentation
- Week resources
- Relevant retained examples in the repository, where referenced above