Solution

ID: past-exam-of-the-mathematics-course-of-the-university-of-cambridge/2016/ib/paper-2/4e/b/solution

Take to be the set , equipped with the discrete metric
Every Cauchy sequence is eventually constant: its terms must eventually have mutual distance in this metric less than . Consequently is a complete metric space. Its topology is the discrete topology, since every singleton is a ball of radius and every subset is a union of such balls.
For the codomain use the usual subspace topology on . The inverse image of any open set there is a subset of the discrete , hence is open. Therefore is continuous and plainly surjective. A continuous image of a complete metric space need not be complete. The two occurrences of have different domain and codomain metrics.

New to topics? Read the docs here!