Every year during the 14th of March we celebrate Pi day. This is due to the fact that Pi is close to 3.14, but what is it's true value and how can we compute it? In this article you'll learn two ways of approximating this number!
- The approximation we will compute is based on the probability to get a point inside a circle. As we know that the ratio of the areas is Pi, we will be simulating a certain number of points, and check whether the point lies in the circle or not. The code to do so can be found here:
Can you find more ways to approximate Pi? Send us your ideas at firstname.lastname@example.org, and happy Pi day!