Finding a continuous function $f: \mathbb{R} \to \mathbb{R}$ such that $f(\mathbb{R})$ is neither open nor closed Find a bounded, continuous function $f: \mathbb{R} \to \mathbb{R}$ such that $f(\mathbb{R})$ is neither open nor closed?

Take $f(x)$ to be 
$
f(x)=
\begin{cases}
\dfrac{1}{x^2}, \ x\not\in [-1,1],
\\
\\
\\
1 \ \ \  \ , x\in[-1,1]
\end{cases}
$.
Is $f$ continuous? Bounded? What is $f(\mathbb R)$? 
