Solution
= Solution
If such a <continuous function> existed, the inverse images
$$
A=f^{-1}(\{-1\}),
\qquad
B=f^{-1}(\{1\})
$$
would be closed, would cover $I$, and would contain $-1$ and $1$ respectively. Part (b) gives a point in $A\cap B$, which is impossible.