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.
The probability mass function, cumulative distribution function, mean, variance, and a simulator for the binomial distribution.
The continued fraction expansion of a rational number and the resulting list of convergents.
Simulated and exact distributions for the sum of fair dice.
Finite discrete-time Markov chains: the distribution after $n$ steps and the stationary distribution.
The Newton-Raphson method for finding roots of single-variable expressions, with symbolic differentiation.
Solving and sampling first-order initial value problems for ordinary differential equations.
Real quadratic equations: the discriminant, the set of real roots, the number of real roots, and the vertex of the parabola.
The mean, the median, the population and sample standard deviations, and the three quartiles, implemented directly from their definitions.