Is it possible to define $f: S \rightarrow T$ such that $f$ is continuous and onto for each of the following pairs of $S$ and $T ?$ Is it possible to define $f: S \rightarrow T$ such that $f$ is continuous and onto for each of the following pairs of $S$ and $T ?$ For each pair, provide an example of one such $f,$ if possible; otherwise, show that it is impossible to define one such $f$
$(i) S=(0,1) \times(0,1)$ and $T$ is the set of rational numbers.
$(ii) S=(0,1) \times(0,1)$ and $T=[0,1] \times[0,1]$
My attempt : continuous image of connected set is connected . (0,1)×(0,1) is connected but ${Q}$ is not , so (i) is false
Help me solving (ii) thank you

The answer to ii is yes. For example, we could consider the function $f:S \to T$ defined by
$$
f(x,y) = (\sin^2(2 \pi x),\sin^2(2 \pi y)).
$$
