Example Group Projects

These example projects are worked submissions for the group project. Each one is a small Python library that satisfies the submission requirements: a library file, a test file, a README.md with the four Diataxis sections, and a short paper.

The example projects are written at the 'good' level of the marking scheme, not the 'exemplary' level. They are intended as a model of a submission that hits every component clearly, not as a ceiling.

Each example is listed below. Click the file name to view its source, or follow the project page link for an overview.

binomial

The probability mass function, cumulative distribution function, mean, variance, and a simulator for the binomial distribution.

continued_fractions

The continued fraction expansion of a rational number and the resulting list of convergents.

dice

Simulated and exact distributions for the sum of fair dice.

markov

Finite discrete-time Markov chains: the distribution after $n$ steps and the stationary distribution.

newton

The Newton-Raphson method for finding roots of single-variable expressions, with symbolic differentiation.

ode_flow

Solving and sampling first-order initial value problems for ordinary differential equations.

quadratic

Real quadratic equations: the discriminant, the set of real roots, the number of real roots, and the vertex of the parabola.

stats_from_scratch

The mean, the median, the population and sample standard deviations, and the three quartiles, implemented directly from their definitions.