Is $f$ continuous or not? 
Let $f:\Bbb Q\cap[0,1]\to[0,1]$ be given by 
$$f(x) =\begin{cases}
1,&\text{if }x>\frac{\sqrt2}2\\\\
0,&\text{if }x<\frac{\sqrt2}2\;.
\end{cases}$$
Is $f$ continuous or not ?

I think it is not continuous.
Am I right/wrong ?
 A: Let $U$ be an open subset of $[0,1]$. Now we consider $4$ cases.
If $U$ contains neither $0$ nor $1$, then $f^{-1}(U)=\emptyset$.
If $U$ contains $0$ but not $1$, then $f^{-1}(U)=\mathbb{Q}\cap\left[0,\frac{\sqrt{2}}{2}\right)$.
If $U$ contains $1$ but not $0$, then $f^{-1}(U)=\mathbb{Q}\cap\left(\frac{\sqrt{2}}{2},1\right]$.
If $U$ contains both $0$ and $1$, then $f^{-1}(U)=\mathbb{Q}\cap[0,1]$. 
In all cases, $f^{-1}(U)$ is open in $\mathbb{Q}\cap[0,1]$, and thus $f$ is continuous.
A: Attempt:
$D=\mathbb{Q} \cap ([0,√2/2) \cup (√2/2,1])$.
1)  $0 \le x _0 \lt √2/2$, rational.
Let $\delta \lt \min ( (√2/2 -x_0), x_0)$.
For $\epsilon >0$:
$|x-x_0| \lt \delta$ implies 
$|f(x)-f(x_0)|=0 \lt \epsilon$.
2)Let $√2/2 <x_0 \le 1$.
Proceed similarly as in 1).
Hence f is continuos in $D.$
A: We use the $\epsilon - \delta$ method for showing continuity.
Given $x \in \mathbb{Q}\cap[0,1]$ either $x > \frac{\sqrt2}{2}$ or $x <\frac{\sqrt2}{2}$.
In order to check continuity at a point c in the given domain:
Thus given, $\epsilon > 0$, if $c > \frac{\sqrt2}{2}$, choose your $\delta = \frac{1}{2}min\{1-c,c - \frac{\sqrt2}{2}\}$. Then $|f(x)-f(c)| = 0 < \epsilon$, $\forall x \in B_{\delta}(c)$. 
If $c < \frac{\sqrt2}{2}$, choose your $\delta = \frac{1}{2}min\{c, \frac{\sqrt2}{2} -c\}$. Then $|f(x)-f(c)| = 0 < \epsilon$, $\forall x \in B_{\delta}(c)$. 
