Prob distribution/moment general functions

#1
Hey all,

I have this problem to do for my math homework:

Probability distribution for a random variable is given by, p(x) = (p^(x/2))(1-p)^(1-x/2) for x=0,2. Find the moment-generating function Mx(t). Also find E(x) and Var(X).

Any help in starting? Thanks!