k

k = 4 (slider from 1 to 6, step 1)
PunkteXAchse = Sequence((i, 0), i, 1, 6)
n = 5 (slider from -5 to 10)
p = nCr(n, k)
zW: {1, 5, 10, 10, 5, 1}
nW = 32 (slider from -5 to 50)
S2 = Polygon({(1.5, 0), (2.5, 0), (2.5, 5 / 32), (1.5, 5 / 32)})
S3 = Polygon({(2.5, 0), (3.5, 0), (3.5, 10 / 32), (2.5, 10 / 32)})
S4 = Polygon({(3.5, 0), (4.5, 0), (4.5, 10 / 32), (3.5, 10 / 32)})
S5 = Polygon({(4.5, 0), (5.5, 0), (5.5, 5 / 32), (4.5, 5 / 32)})
S6 = Polygon({(5.5, 0), (6.5, 0), (6.5, 1 / 32), (5.5, 1 / 32)})
S1 = Polygon({(0.5, 0), (1.5, 0), (1.5, 1 / 32), (0.5, 1 / 32)})
P = Point(PunkteXAchse)
v = 0.04 (slider from -5 to 5)
T: "P(X = " + (LaTeX[x(P)]) + ") = \frac{" + (LaTeX[zW(x(P))]) + "}{" + (LaTeX[nW]) + "}"