code Link to heading

import random as rnd

xmin = 3
xmax = 7
Nx = xmax - xmin + 1

for i in range(10):
  x = [0] * Nx

  Ni = 200
  for i in range(Ni):
    xi = rnd.randint(xmin, xmax)
    x[xi - xmin] += 1
  
  print(x)

url https://onecompiler.com/python/3zn6p7r2b

result Link to heading

[50, 31, 43, 34, 42]
[31, 40, 46, 42, 41]
[40, 41, 49, 35, 35]
[39, 41, 49, 41, 30]
[47, 38, 38, 37, 40]
[45, 49, 34, 38, 34]
[41, 37, 39, 41, 42]
[29, 34, 47, 54, 36]
[27, 34, 55, 46, 38]
[51, 25, 46, 40, 38]

chart Link to heading