Solution (source code)

= Solution

Let $\widehat Q\psi_n=q_n\psi_n$ with $\psi_n\ne0$. The <Hermitian operator> identity and conjugate linearity of the first slot of the <inner product> imply
$$
q_n\langle\psi_n,\psi_n\rangle
=\langle\psi_n,\widehat Q\psi_n\rangle
=\langle\widehat Q\psi_n,\psi_n\rangle
=q_n^*\langle\psi_n,\psi_n\rangle.
$$
The squared <norm> is positive, so $q_n=q_n^*$: every such <eigenvalue> is real.