Exploring the mathematics behind camera lens apertures and f-stop ratios with a bit of help from Python.

Continue reading

Exploring the mathematics behind camera lens apertures and f-stop ratios with a bit of help from Python.

Continue reading

In this article I will write a simple module to display very large or very small numbers in scientific notation in a more appealing format than that used by Python.

Continue reading

I often use mathematical symbols in Python code which results in me scrabbling around to find the ones I need so I decided to write a simple module to simplify the process, which I will describe in this article.

Continue reading

In this project I will write a Python class to represent angles in various units, and provide a selection of arithmetic and comparison operators.

Continue reading

In the first part of this article I wrote code to calculate rough estimates of square roots which enable formulas which converge on accurate square root values to do so with fewer iterations. Part 1 also included code to graph estimates to compare them to accurate values.

In this second part I'll implement some of those formulas, again graphing the results alongside definitive values.

Continue reading

The *International System of Units*, commonly known as the *SI System*, consists of seven base units for measuring quantities such as mass, time and electric current. These base units can be combined into *derived units* to measure a wide range of other quantities.

In this article I will develop a Python class to represent base unit values and associated methods. In a future article I will extend the project to handle derived units.

Continue reading

There is plenty of information around on Python's set data structure but it usually approaches the topic from a programming perspective. In this article I will look at Python sets from the mathematical point of view.

Continue reading

On your travels round the internet you may have seen pieces of text with all but the first and last letters of each word jumbled up but still easily readable. If you are tempted to try jumbling up words yourself then read on - in this article I'll implement a simple program in Python to do just that.

Continue reading

The Ancient Greek polymath Eratosthenes of Cyrene made the first serious attempt at calculating the size of the Earth. Using very simple observations and mathematics he achieved a surprisingly accurate result and in this article I will replicate his calculations in Python.

Continue reading

Bacon's Cipher is a very simple and very old method of encoding a message and is now only of interest as a historical relic, but it also provides an interesting little programming project. In this article I will code it in Python.

Continue reading