P(X\, \leq\, k) \, =

p = 0.36 (slider from 0 to 1, step 0.01)
q: 1.0 - p
k = 3 (slider from 1 to 50, step 1)
cdf = Sum(Sequence[q^(i - 1.0) * p, i, 1.0, k])
Text["P(X<=k) = " + cdf]: cdf
Text1 = Text(cdf)
a = BarChart(0.5, 50.5, Sequence[q^(i) * p, i, 0.0, 49.0])
b = BarChart(0.5, k + 0.5, Sequence[q^(i) * p, i, 0.0, k - 1.0])
f(x) = p * q^(x - 1.0)