A Binomial variable counts the number of successes in n independent Bernoulli(p) trials. Its PMF gives the probability of exactly k successes; its CDF gives the probability of at most k.
Task: write binomial_pmf_cdf(n, p, k) returning [pmf, cdf], each rounded to 4 decimal places, where cdf = P(X \le k).
cdf is the running sum of the pmf from 0 up to and including k.n = 1, this collapses back to a plain Bernoulli trial.