In: Computer Science
USING PYTHON ONLY
solution:
given data:
Python code:
SOURCE CODE:
import numpy as np
def fun():
arr=np.random.randn(1);
if(arr<0.1):
return arr,"reject";
else:
return arr,"not reject";
L=[];
for i in range(25):
res=fun();
L.append(res[1]);
print(L);
SOURCE CODE:
import numpy as np
def fun():
arr=np.random.randn(1);
if(arr<0.1):
return arr,"reject";
else:
return arr,"not reject";
L=[];
for i in range(25):
res=fun();
L.append(res[1]);
print(L);
OUTPUT:
please give me thumb up