I would use the Dirichlet function. It is defined to be for rationals and for irrationals. It is nowhere continous.

Again use Dirichlet.2. If f(K) is sequentially compact whenever K is sequentially, then f is continuous.

Again use Dirichlet.3. If f(A) is closed whenever A is closed, then f is continuous.

Define and .4. If f(A) is open whenever A is open, then f is continuous.

Then .

And it is clearly not continous.