Prove that $X=\{(x,y) :x\text{ is rational or }y\text{ is rational}\}$ is path connected.
So for every $(x,y)$ in $X$, I need to find a continuous function $f$ on $[a,b]$ such that $f(a)=x$ and $f(b)=y$.
Trying to think about suitable functions, maybe one which sends everything to nearest rational. But don't think such a function exists.
Indeed, a "nearest rational" does not exist. If $x$ is rational, you can find an obvious path from $(x,y)$ to $(x,0)$ and then on to $(0,0)$. Similarly, if $y$ is rational, you can find a path to $(0,0)$ via $(0,y)$. Thus any $(x,y)\in X$ is pathconnected to $(0,0)$.