蒙特卡罗法学习实例 import random total=10000##总共有这些点 count=0##在圆上的点 for i in range(total): x=random.random() y=random.random()