Skip to content

Python Take-Home Task

A timed take-home in the shape real hiring uses: read messy data, compute a result, test it, and hand over a repository someone else can run.

Kind
project
Status
draft · v0.1.0
License
CC BY-SA 4.0

Outcomes measured

Evidence required

  1. A repository a reviewer can clone, install and run from the README alone, with the command that runs it and the command that runs the tests.
  2. A working solution to the stated problem over the supplied data, including the rows that are malformed.
  3. Tests covering the ordinary case, an empty input, a boundary, and the error the code is supposed to raise.
  4. A short written note stating how the running time grows with input size, and which line decides it.
  5. A paragraph naming what was deliberately left undone and why, given the time limit.

Task

You have three hours and any documentation you like.

You are given a CSV of records — a few thousand rows, some of them malformed: missing values, numbers stored as text, duplicate identifiers, one row with too many fields. Write a Python program that:

  1. reads the file and reports how many rows it accepted and how many it rejected, and why;
  2. computes a summary the brief asks for, such as a total per category and the top five by value;
  3. writes the summary to a new file as CSV or JSON, the choice being yours to justify;
  4. is covered by tests that run with one command.

Then write a README that says what it does, how to run it, how to test it, and what you left out.

The assessor supplies the data file and the exact summary required. Any dataset with dirty rows works; what matters is that the learner did not see it while writing the code.

Scoring guide

Proficient Developing Beginning
Correctness Produces the right summary, and handles every malformed row deliberately Right on clean rows; bad rows crash it or are dropped silently Does not produce the summary
Tests Ordinary, empty, boundary and error cases; all run with one command; at least one would fail if the logic broke Some tests, mostly the happy path None, or they do not run
Handover Cloned, installed and run from the README with no questions Runs after a guess or two The reviewer cannot run it
Cost States the growth rate and the deciding line, and is right Mentions performance vaguely No account of cost
Judgement Names what was left undone and why, and the choices are defensible Silent about trade-offs Claims completeness that the code does not support

A submission is Proficient overall when Correctness, Tests and Handover are all Proficient and nothing is Beginning. An unfinished solution with honest tests and a clear note scores above a finished one nobody can run.

Free instruments

Any Python 3 and pytest, both free. No account, platform or paid service is required, and none of the resources in this domain costs money. An assessor with no budget can run this with a text editor and a terminal.

Where this assessment is used

Courses that prepare for it

draft

Python for a Coding Assessment

A refresher path through the Python graph for someone who has written Python before and has an assessment coming: run and read, rebuild the core, then work the way an assessment expects.

Credentials that require it

draft

Python Problem Solving

The holder can take an unfamiliar problem, write a tested Python solution someone else can run, and explain what it costs.