Answer
$f(x)=\left\{\begin{array}{l}
1\ ~~~\mathrm{i}\mathrm{f}~~\mathrm{x}\ \neq 0\\
0\ ~~~\mathrm{i}\mathrm{f}~~\ x=0
\end{array}\right.$
Domain: $(-\infty,\infty)$
Range: $\{0$, 1 $\}$
Work Step by Step
We see that the graph is a horizontal line $y=1$, except for a discontinuity at $x=0$, where the graph jumps to $(0,0)$. Thus we have:
$f(x)=\left\{\begin{array}{l}
1\ ~~~\mathrm{i}\mathrm{f}~~\mathrm{x}\ \neq 0\\
0\ ~~~\mathrm{i}\mathrm{f}~~\ x=0
\end{array}\right.$
The domain is all real numbers, while the range is either $0$ or $1$:
Domain: $(-\infty,\infty)$
Range: $\{0$, 1 $\}$