Created
January 15, 2017 09:56
-
-
Save ashiato45/2d962da6fff98b9ce32001cb81a629ed to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
a=[0] | |
c=0 | |
n=200000 | |
import numpy | |
for i in range(2*n): | |
b=numpy.random.rand(1,2) | |
a.append(b) | |
for j in range(i,n): | |
d=a[j]**2+a[2*j]**2 | |
if d <= 1: | |
c+=1 | |
pai=4*c/n | |
print(a[3]) | |
print(a[3][0,1]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment