A small tool someone else could extend

Write a small tool that turns a list of records into a fixed-width text report: a header, one line per record, and a totals line at the bottom. Amounts align on the decimal point; names longer than the column are truncated with an ellipsis. The brief is deliberately mundane. What is being marked is whether the logic is in functions that return strings — which is what makes it testable — rather than in a script that prints as it goes.

Part of the Python Fundamentals course~90 minutesEvidence: a write-upWe mark it against a checklist you can read first
01 · What counts as done

What you have to hand in

  • A header, aligned record lines, and a totals line.
  • Amounts aligned on the decimal point to two places.
  • Over-long names truncated rather than breaking the alignment.
  • The formatting logic returns strings; printing happens in one place.
  • Sensible behaviour on an empty list of records, stated rather than accidental.
02 · How it will be marked

The checklist, published before you start

We score your work against each line below, and every score has to quote the part of your work it is based on. You read all of it first, so you can argue with any score on the specifics.
  • It does what the brief asked35% of the grade

    Every behaviour named in the brief is present and works as described.

    1. AbsentCore behaviour is missing or does something else.
    2. DevelopingMain path works; a stated requirement is unmet.
    3. Competent— this is the pass markEvery stated requirement is met.
    4. StrongEvery requirement met, and the boundaries of each are stated.
  • The pieces are testable25% of the grade

    Logic lives in functions that return values, rather than in a script body that prints as it goes.

    1. AbsentOne top-level script; nothing can be called in isolation.
    2. DevelopingSome functions, but the important logic still prints rather than returns.
    3. Competent— this is the pass markLogic in functions that return their results.
    4. StrongFunctions with clear signatures, and the I/O confined to one place.
  • It behaves sensibly on bad input25% of the grade

    The tool's response to input it cannot handle is a decision, not an accident.

    1. AbsentCrashes with an unhandled traceback on ordinary bad input.
    2. DevelopingCatches failures broadly, hiding what went wrong.
    3. Competent— this is the pass markHandles the specific anticipated failures and lets the rest surface.
    4. StrongHandles them, and the message tells the user what to do next.
  • A colleague could extend it15% of the grade

    Names and structure make the next change obvious.

    1. AbsentOpaque names, no structure.
    2. DevelopingReadable in places.
    3. Competent— this is the pass markClear throughout.
    4. StrongThe shape of the code suggests where a new feature would go.
03 · What this proves

The skills a pass would prove

Pass, and these skills count as proven, with this piece of work attached as the evidence.

This brief is part of the Python Fundamentals course

Starting it starts the course: every skill above, in the order they depend on each other, with this brief at the end as the thing you hand in — marked against the checklist you have just read and nothing else.

About three minutes to set up: what you want to do with Python Fundamentals, where you are starting from, and how many hours a week you actually have. The subject we already have from this page.Start the Python Fundamentals course
See the whole Python Fundamentals course, or every graded brief we run.

One cookie, so we can see which subjects people finish and where the site loses them — plus a replay of where you click. Nothing you type is recorded, and once you’re signed in the words on screen are blanked out too. No advertising, nothing sold. The detail.