Question: Write a functional programme in Python: The mathematician Ramanujan found an infinite series that can be used to generate a numerical approximation of 1 2V2
Write a functional programme in Python:
The mathematician Ramanujan found an infinite series that can be used to generate a numerical approximation of 1 2V2 (4 k)! (1103+26390 k) (k!)4 3961 T 9801 4k Write a function called 'estimate_pi(' that takes no input argument uses the formula above to compute an estimate of 7T. Return your result, noting that a manual return value of T Use a 'while' loop to compute terms of the summation until the last term is smaller than 1.0e-15 (i.e. 10-15). Note that you'll either have to use a built-in factorial function or use your own from earlier exercises in the script. (math pi or 3.1415.) will be moderated to zero marks
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
