Consider N⊂R with the standard metric. Let (X,d) be a metric space and f:X→N a continuous function.
a) Prove that if X is connected, then f is constant (the range of f is a single value).
b) Find an example where X is disconnected and f is not constant.