Exploring SI Units in Python Part 1: Base Units

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

Geometric and Harmonic Means in Python

The most commonly known and used statistical mean is the arithmetic mean, calculated by adding all values and dividing the result by the number of values. The arithmetic mean is one of a "family" of three means called the Pythagorean means, the other two being the geometric mean and the harmonic mean. In this post I will explain when you might need to use these alternatives and then show how to calculate them using Python.

Continue reading