Solution (source code)

= Solution

The three tosses are <independent events>, each with head <probability> $1/2$. Consequently
$$
\boxed{\mathbb P(HHH)=\left(\frac12\right)^3=\frac18}.
$$