Show that, for any $0<r<R$, there exists a function $\phi\colon\mathbb R^n\to[0,1]$ such that $$\phi(x):= \begin{cases} 1 & \text{when }x\in B(x,r), \\ 0 & \text{when }x\in B(x,R)^c. \end{cases}$$ where recall that $B(x,r)=\{y\in\mathbb R^n; |y-x|<r\}$.
My Attempt: I found this problem so trivial. We can always find a function $\phi(x) = \begin{cases} 1 , x \in B(x,r) \\ 0 , x \in B(x,R)^c \\ \frac{1}{2} \text{otherwise }\end{cases}$
Is there any twist ? Can anyone please tell me ?