A random variable $X$ has the discrete uniform distribution
$$
f(x)=\frac{1}{m}, \quad x=1,2, \ldots, m
$$
(a) Show that the moment-generating function is $M_{X}(t)=\frac{e^{t}\left(1-e^{t m}\right)}{m\left(1-e^{t}\right)}$
(b) Use $M_{X}(t)$ to find the mean and variance of $X$.