Why does my python Monte Carlo simulation not produce a normal distribution?
import random
import matplotlib.pyplot as pyplot
import numpy
P = 0.1
TR = 1_000
l = []
for _ in range(TR):
tosses = 0
success = False
while success == False:
success = bool(numpy.random.binomial(1, P, 1)[0])
tosses += 1
l.append(tosses)
pyplot.hist(l, bins=100)
pyplot.show()

Bernoulli trials are not normally distributed in general. I suggest you take a look at theese two links: https://byjus.com/maths/bernoulli-trials-binomial-distribution/ https://www.probabilitycourse.com/chapter3/3_1_5_special_discrete_distr.php
I assume your task is related to obtaining a normal distribution via summing the outcomes of multiple bernolli trials I think this should work for you: