Continuous surjective mapping from half-open interval to the reals / the Cantor set 1) Is there a continuous surjective mapping of $(0, 1]$ to $\mathbb{R}$ ?
To me it seems not, but haven't been able to prove why it is false though. I was thinking of finding compact sets contained in (0, 1], and having the right endpoint fixed, e.g $[\frac{1}{2} ,1]$ $[\frac{1}{3}, 1]$, $[\frac{1}{4}, 1]$ etc. But then not sure if this is the right approach or what to do after this.
2) Is there a continuous surjective mapping of $(0, 1]$ to the Cantor Set ?
Again to me it seems not true because Cantor Set is Hausdorff space (to be precise it is Stone space) and we know that the pre-image of continuous functions should conserve compactness if we are mapping to a Hausdorff space, and Cantor Set is compact, but is there any other way to prove this without talking about Hausdorff space or compactness of the Cantor Set?

For 1) consider $\frac{1}{x} \sin\frac{1}{x}$
2) is false since the image of a connected set under a continuous map is connected.
