Solution (source code)

= Solution

A <metric space> is a <complete metric space> when every <Cauchy sequence> converges to a point of that space. It is a <totally bounded space> when, for every $\varepsilon>0$, finitely many open metric balls of radius $\varepsilon$ cover the space.

With their usual distances, \b[$\mathbb R$ is complete but not totally bounded], and \b[$(0,1)$ is totally bounded but not complete]. The <Cauchy sequence> $1/n$ in $(0,1)$ has its limit outside the space; no finite collection of balls of a fixed radius covers $\mathbb R$.

For the requested <continuous functions>, take
$$
f:\mathbb R\longrightarrow(0,\infty),\qquad f(x)=e^x,
$$
and
$$
g:(0,1)\longrightarrow(1,\infty),\qquad g(x)=\frac1x.
$$
Both are continuous and onto. The domain of $f$ is a <complete metric space>, but its image is not complete because $1/n$ tends to the missing point $0$. The domain of $g$ is a <totally bounded space>, but its unbounded image is not totally bounded. Uniform continuity, unlike mere continuity, would preserve total boundedness.