Bernoulli Sample
Given a random Bernoulli trial generator, write a function to return a value sampled from a normal distribution.
Example:
Input:
def bernoulli_sample(p):
"""
generate 100 outputs of bernoulli sample , given prob of 1 as p and 0 as 1-p
Output:
55
.....
Loading editor