

The first two ingredients are understandable, but you may ask why did I specifically mention patience. and most importantly you will need patience.A Python environment where you can run some code, see previous post to set this up or read till end.Now that we know a little bit about Pi let us perform a computational experiment to determine its value.Ĭomputational Experiment: Ingredients and methodįor this experiment you will need the following ingredients. however the rational number works well in many situations because mostly we round of as being 3.14. is an irrational number, which means that it cannot be written as, as taught in schools. The quantity referred to as can be calculated as the ratio of the circumference of a circle to its diameter. I found out about it from my significant other while writing about this post. But as always before that some background (or ranting).ĭid you know that there is something called the Pi day? I didn’t. To this end, I am going to put together a concise Pythonic example which would help you calculate the value of Pi ( ) ( yes the number approximated by the fraction or rounded off to 3.14 ). Instead it provides exposure on using the Python programming language in a scientific context.

This blog doesn’t attempt to teach you Python. As discussed before, there are many resources available on the internet for learning Python. Building on the previous post, which covered a very simple example using a for loop, this post will take things up a notch.
