Let $X$ be the number of times that Batman gets punched. Then $X$ is a Bernoulli random variable with parameter $p$, so if we are familiar with the Bernoulli distribution then we might already know the expected value and variance of $X$ by heart. If not, we can compute them as follows.
The expected value of $X$ is $$ E(X) = p \cdot 1 + (1-p) \cdot 0 = p. $$ The variance of $X$ is $\text{Var}(X) = E(X^2) - E(X)^2$. Note that $$ E(X^2) = p \cdot 1^2 + (1 - p) \cdot 0^2 = p. $$ Thus, $$ \text{Var}(X) = p - p^2 = p(1 - p). $$ The standard deviation of $X$ is $\sqrt{p(1-p)}$.