Solution (source code)

= Solution

Let $X\subset\mathbb P^3$ have degree $d\geq3$ and hyperplane class $H$. The <adjunction formula> gives $K_X=(d-4)H$. For a line $L\subset X$, the same formula on the <smooth rational curve> $L$ yields $(K_X+L)\cdot L=-2$, hence
$$
\boxed{L^2=2-d<0.}
$$
Thus all lines are <negative curves>, and part (b) makes their set countable. The <Fano scheme of lines> is a closed <projective scheme> of $\operatorname{Gr}(2,4)$. A positive-dimensional complex algebraic component would have uncountably many points, so this scheme is zero-dimensional. A <projective scheme> of <finite type> has only finitely many zero-dimensional points. This proves the <finiteness of lines on a smooth surface of degree at least three>.