This is a problem from Liu`s book. Show that a scheme $X$ is quasi-compact if and only if it is a finite union of affine schemes. If the scheme is quasicompact then it is obviously a finite union of affine schemes. How to show the converse? Do we need that the affine schemes should be open in $X$?
I think Liu meant affine open subschemes, but in the end it doesn't matter (at least here). If a topological space is a finite union of quasi-compact subspaces, then it is again quasi-compact. In particular, a scheme which is a finite union (of course one means the underlying topological space ...) of affine schemes, then it has to be quasi-compact. Conversely, any quasi-compact scheme is a finite union of affine open subschemes, since we may find a finite subcovering of any given affine open covering.