This proportion will be the ratio of the area of the circle


A random number generator can be used to estimate π as follows (such a method is called a Monte Carlo method). Write a script which generates random points in a square with sides of length 2, say, and which counts what proportion of these points falls inside the circle of unit radius that fits exactly into the square. This proportion will be the ratio of the area of the circle to that of the square. Hence estimate π. (This is not a very efficient method, as you will see from the number of points required to get even a rough approximation.)

Request for Solution File

Ask an Expert for Answer!!
Basic Computer Science: This proportion will be the ratio of the area of the circle
Reference No:- TGS02209259

Expected delivery within 24 Hours