Solution (source code)

= Solution

The squared signal equals $1\,\mathrm{V^2}$ except at irrelevant isolated jump times. Its <mean-square signal power> is therefore
$$
\boxed{P=\frac1{4\,\mathrm s}\int_0^{4\,\mathrm s}|g(t)|^2\,dt=1\,\mathrm{V^2}.}
$$
Here “power” has the signal-processing definition specified in the question. To convert this voltage mean square into electrical <power> in watts, a load <electrical resistance> would also be required: $P_{\rm electrical}=\langle g^2\rangle/R$.