4. Let K be a compact subset of R and let f be a real —vaiued function on K. Prove that if f is continuous on K, then f (K) is compact. (10 points)