This is a repository for miscellaneous other coding exercises, implemented in Python 2.7.12. This repository contains the following files:
A simple implementation of the game Battleship.
An implementation of linked lists, a standard data structure useful especially in some lower-level languages such as C.
An approximation of the value of π by Monte Carlo simulation with direct sampling.
An implementation of the Sieve of Eratosthenes, which is then used to generate the prime factorisation of a given number.
A class of vectors in the vector space ℝ^3 defined with the L^2 (Euclidean) metric. This supports the methods of vector addition and subtraction, scalar multiplication and division, dot and cross products, magnitudes, the creation of unit vectors, component-by-component comparison, and parity. Two-vectors are then defined as a daughter class with the same methods;