@FrankScience i aked a question how to show that $f$ is closed and not open: $$\begin{array}{ccc}
f:[0,2] & \longrightarrow &[0,2] \\
x& \longmapsto & f(x) \\
\end{array},\; f(x)=\left\{\begin{array}{cc}
0& x\in [0,1], \\
x-1 & x\in [1,2].
\end{array}
\right.$$