Let X be a compact metric space. Show that a continuous function $f:X\rightarrow\mathbb{R}$ is bounded.
Attempt: So compact $\implies$ closed and bounded, but it is not always the case that if $A$ is bounded that $f(A)$ is bounded. So I think I need to show that $X$ compact $\implies$ $\exists M\in\mathbb{R}$ : $|f(x)|\leq M$ (definition of a bounded function). Maybe letting $M=\sup(X)$ would work? I'm just not sure that I'm allowed to take a $\sup$ of an arbitrary metric space.