is this continuous and differentiable Let $I=\{1\}\cup\{2\}$, for $x\in\mathbb{R}$,$f(x)=\operatorname{dist}(x,I)=\inf\{|x-y|:y\in I\}$
Then
1.$f$ is discontinuous some where on $\mathbb{R}$
2.$f$ is continuous  on $\mathbb{R}$ but not differentiable only at $1$
3.$f$ is continuous  on $\mathbb{R}$ but not differentiable only at $1,2$
4.$f$ is continuous  on $\mathbb{R}$ but not differentiable only at $1,2,3/2$
What I think is $f(x)=0$ when $x=1,2$ and $f(x)>0$ when $x\in \mathbb{R}\setminus\{1,2\}$ so it is continuous on $\mathbb{R}$ and it is not differentiable at $1,2$. Am I right?

Option $4$ is the correct one. The function isn't differentiable at $\frac{3}{2}$.
How do you see this. Well, first try to sketch the graph of $f$ and then it should be clear. 
If you want to be more precise, you could try to write down an expression for $f$. So 
$$
f(x) = \begin{cases} 1 - x & \text{for } x \leq 1 \\
 ??_1 & \text{for } 1 < x \leq \frac{3}{2} \\
 ??_2 & \text{for } \frac{3}{2} < x < 2 \\
 x - 2 & \text{for } 2 \leq x
\end{cases}
$$
(fill in $??_1$ and $??_2$.)
Then you could use this expression to check the differentiability by definition. I.e. you would for example check whether (considering the point $x = 2$)
$$\begin{align}
\lim_{h\to 0^{+}} \frac{f(2 + h) - f(2)}{h} &= \lim_{h\to 0^{-}} \frac{f(2 + h) - f(2)}{h} \quad \quad\Leftrightarrow \\
\lim_{h\to 0^{+}} \frac{2+h - 2 - 0}{h} &= \lim_{h\to 0^{-}} \frac{??_2(2 + h) - 0} {h}.
\end{align}
$$
