problem is also a Monte Carlo simulation, but this time in thecontinuous domain: must use the following fact: a circle inscribedin a unit square
has as radius of 0.5 and an area of ??(0.52)=?4.??(0.52)=?4.
Therefore, if you generate num_trials random points in the unitsquare, and count how many land inside the circle, you cancalculate an approximation of ?
For this problem, you must create code in python
(A) Draw the diagram of the unit square with inscribed circleand 500 random points, and calculate the value of ?
(B) Without drawing the diagram, calculate the value of ? youwould get from 105 trials.
(C) After completing (B), try to get a more accurate value for ?by increasing the number of trials.The results will depend on yourmachine