Is $f:\Bbb Q\rightarrow \Bbb R$ continuous? Define $f:Q\rightarrow R$ such that $f= 1$ if  $x^2&lt;2$  or  $f=0$ is  $x^2&gt;2 $. Is this function continuous? All proofs are welcomed but i am more interested using the definitions  maybe the definition that the preimage of a continuous function sis an  οpen set or the ε,δ definition.My problem is that these definitions are for a single point.How can i use the definitions for every point?Trying to practice on using definitions and get a better understanding for continuity rather than that the graph of f is interrupted or has "holes".
It is continuous.

One way to see this is by using the fact that $x \mapsto x^2$ is continuous in $\mathbb{Q}$. Hence, the sets $A=\{x \in \mathbb{Q} \mid x^2 &lt;2\}, B=\{x \in \mathbb{Q} \mid x^2 &gt;2\} $ are open. Since the pre-images of open sets of your function $f$ are $A,B,\emptyset$ and $\mathbb{Q}$, it follows that $f$ is continuous.
Realize that your function f is continuous in R. Therefore, it is definitely continuous on a subset of R, which Q is. This is what you call f restricted to Q. Also, from a metric space standpoint, we know that Q is not a closed set since its complement R\Q is not open (you can prove this easily). Therefore, just use the definition of continuity as you pointed out. Take any open set, its pre image will be in Q, which is not closed.