How to prove that a continuous mapping from a compact, connected space..

118 Views Asked by At

If $ f $ is a continuous mapping from a compact, connected metric space M to the real numbers and there exists a real number s such that f(m) never equals s, then there exists a constant $ c>0 $ such that either $ f(m)>s+c $ or $ f(m)<s-c.$ Intuitively this makes sense but I can't come up with a proof.