Skip to content

Solve a coding problem under assessment conditions

I can take an unfamiliar problem statement, restate what it asks, choose a data structure and an approach, write a working solution with tests, and explain the trade-off I made — inside the time I was given.

Domain
Python Programming
Level
advanced
Status
draft · v0.1.0
Also called
Coding interview, Technical assessment, Take-home task, Coding challenge
License
CC BY-SA 4.0

Learn first

Learn it

Scope

Everything in this domain, performed at once, against a clock, with someone watching or a submission deadline.

In scope: reading a problem statement, deciding an approach, writing and testing a solution, and explaining it. Out of scope: memorised algorithm catalogues and puzzle-specific tricks. This node is about conducting yourself, not about having seen the question before.

Restate before you write

The most reliable gain available is refusing to start immediately. Say back what the input is, what the output is, and what the statement did not say: empty input, duplicates, ties, ordering, size. Under a real assessment, ask; in a take-home, write the assumption down and keep going.

Most failures in these settings are not ignorance of Python. They are solving a slightly different problem from the one asked, discovered with ten minutes left.

Decide the shape, then write

Name the operation the solution does most, and pick the structure that makes it cheap — the data-structure node, under time pressure. Say the growth rate out loud as you choose, because it is the question you will be asked anyway, and because saying it aloud catches the accidental quadratic before you have written it.

A working simple solution beats an unfinished clever one. Write the obvious version, make it pass, then improve it if time remains and say what you would improve if not.

Tests are not optional here

In a take-home they are half the grade. Under observation they are what distinguishes someone who believes their code from someone who has checked it. The ordinary case, an empty input, and a boundary: three tests, two minutes, and the first one usually finds something.

Narrate

Say what you are doing and why while you do it. Silence is unreadable, and an assessor cannot give credit for reasoning they cannot hear. Narrating also slows you down at exactly the moments when slowing down helps.

If you get stuck, say what you have tried and what you would try next. That is information about how you work, which is what is actually being assessed.

Common misconceptions

  • “They want the optimal solution.” They want a correct solution, reasoning they can follow, and an honest account of the trade-off. Optimal-but-silent scores worse than good-and-explained.
  • “Asking a question looks weak.” Clarifying is part of the work, and doing it is a positive signal.
  • “Tests waste time I need for the solution.” The three tests that catch the empty-input bug cost less than the bug does.
  • “Practising means grinding puzzles.” Practise the conduct: restate, decide, test, explain. That transfers; a memorised puzzle does not.

Notes for teachers

Set a timer, give a problem with a deliberate ambiguity, and score the restatement separately from the solution. Learners are consistently surprised by how much of the grade lives before the first line of code.

Run one session where the learner may not type for the first three minutes. It feels artificial and it fixes the most common failure in the room.

Resources

ResourceKindCostProvider
CS50P problem setspracticefreeHarvard University
Python wiki: time complexity of built-in operationsreferencefreePython Software Foundation

Courses that include 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.

Prove it

Evidence of mastery

  • Restates a problem in their own words, including the input, the output and the cases the statement leaves unsaid, before writing code.
  • Produces a working solution in the time allowed, and says which parts are rough and why that was the right call.
  • Names the growth rate of their solution unprompted, and what they would change if the input were a thousand times larger.
  • Writes tests covering the ordinary case, an empty input and a boundary, and runs them before saying they are finished.
  • Talks through a decision while making it, so a listener can follow the reasoning rather than only the result.

Assessments that measure it

project

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.

Credentials that include 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.

What learners show

Nothing to show yet. The publisher last published on 2026-09-20, and no aggregate for this outcome has reached the 50 learners a number needs. Open Degree does not track learners. About learner evidence.

What comes next

No outcome builds on this yet. Ask for the next concept.