we have $f(x) = x$ if $x$ is rational number
$f(x) = 1-x$ if $x$ is irrational number.
By definition of continuity: $|x - 1/2| <\delta => |f(x) - 1/2| <\epsilon$
a) if we will pick any rational number x within $\delta$ and $1/2$: $|x - 1/2|<\epsilon =\delta$
b)a) if we will pick any irrational number x within $\delta$ and $1/2$:$|1 - x - 1/2|<\epsilon =\delta$
Then we can use the fact, that by continuity of f at x:
$f(x) = f(\lim x_n) = \lim f(x_n) = x$ , if x is rational
$f(x) = f(\lim x_n) = \lim f(x_n) = 1 - x$ , if x is irrational
the only possibility of choice is $1/2$
But my question is: how can we prove last two statements by epsilon-delta definition?