Write a function
估算pi的值(计算在单位正方形的单位圆中点的数量)
然后写一个script 用iteration测试你的implementation
每次让user输入一个整数n。然后用 random function to generate a
number of random points evenly distributed inside the unit square and use the
formula
area = myPI * r^2
用以估算pi的值
我觉得意思就是比如说100个点,然后80个落在圆内,那么圆面积就是0.8
但是这些点怎么放到正方形和圆中啊
万分感谢~~