Answer
See below
Work Step by Step
Let the probability of success on each trial be $p$ and the probability of failure on each trial be $1-p$.
For any particular sequence of $k$ successes and $n-k$ failures, the probability that the sequence occurs is $P=p^k(1-p)^{n-k}$.