This is a reinterpretation of a HW question, so I'm not totally sure if this belongs here, but I was wondering about the following question:
Let $k$ be an algebraically closed field. We define a variety to be a scheme over $k$ that is integral, separated, and finite type, and we say that a variety $X$ is projective if there exists a closed immersion $X\hookrightarrow\mathbb{P}_k^n$ for some $k$. Is it true that for any projective variety $X$, there exists some affine scheme $Y$ and a surjective morphism of $k$-schemes $Y\to X$?
In the original question, we do not require $Y$ to be irreducible (which turns it into a trivial problem), however, I did not see this, and was nonetheless able to prove the theorem in the case where $X=\mathbb{P}_k^n$, without being able to carry my arguments over to a closed subscheme of $X$. In general, I suspect that we would require $\dim Y>\dim X$, as can be seen in the case where $X$ is a nonsingular curve that is not $\mathbb{P}^1$.
My main intuition here is that this problem most likely requires a geometric rather than algebraic solution. More precisely, if we let $X\subset\mathbb{P}^n$ be of codimension $d$, then my thinking was that if we could cover $\mathbb{P}^n\setminus\{*\}$ by an affine, where $*\notin X$, then we could then do some sort of projection, but this is all informal speculation.