Monte Carlo Pi

Pi

Thinking back to high school you may remember being taught about pi and using it in maths classes to calculate perimeters and areas of circles. You may remember being told a good approximation of pi is 3.14, or 22/7. But you may also recall that pi is irrational (meaning, in maths, that it cannot be expressed exactly as a ratio of two integers; basically, writing it out, it goes on forever; there are even books you can buy listing pi to a million decimal places).…