算法設計與分析-HomeWork

  ex1(p20) 代碼如下: 1 import random 2 3 def Darts(n): 4 k=0 5 i=1 6 while i<=n: 7 x=random.uniform(0,1) 8 #y=random.uniform(0,1) 9 y=x 10 if(x**2+y**
相關文章
相關標籤/搜索