This is the exercise 19.5B of Ravi Vakil's Foundations of Algebraic Geometry
Verify that a curve of genus $C$ of genus at least $1$ admits a degreee $2$ cover of $\mathbb{P}_k^1$ if and only if it admits a degree $2$ invertible sheaf $\mathscr{L}$ with $h^0(C,\mathscr{L})=2$.
Here a curve is assumed to be geometrically regular, geometrically integral and projective.
The hint is to show that if $C$ is to show that if $h^0(C,\mathscr{L})\ge 2$, then $h^0(C,\mathscr{L})=2$, and that $\mathscr{L}$ is base point free.
I know how to show $\mathscr{L}$ is base point free if $h^0(C,\mathscr{L})\ge 2$: Suppose $s_1,s_2\ne 0$ are two sections of $\mathscr{L}$ with common zero at a point $p$. If $p$ is a degree $2$ point, $s_1/s_2$ has no zeros and no poles and must be a constant, thus $s_1,s_2$ are linearly dependent.
If $p$ is of degree $1$, write $$div(s_1)=p+q_1, div(s_2)=p+q_2$$ then I have $$\mathscr{O}_C(q_1)=\mathscr{L} \otimes \mathscr{O}_C(-p)=\mathscr{O}_C(q_2)$$ therefore $q_1=q_2$ and $s_1,s_2$ are linearly dependent.
Where the last line I have used the following result from the book:
19.4.2 Corollary. If $C$ is a curve not isomorphic to $\mathbb{P}_k^1$, and $q_1, q_2$ are distinct points on $C$, then $\mathscr{O}_C(q_1)\cong\mathscr{O}_C(q_2)$.
What I don't know is how to argue that $h^0(C,\mathscr{L})\le2$, any help or hints are appreciated, thank you so much!