Maybe I can give a a hint: continuous functions preserve compactness.
Which of the following statements are true about the open interval (0,1) and the closed interval [0,1]?
1. There is a continuous function from (0,1) onto [0,1].
2. There is a continuous function from [0,1] onto (0,1).
3. There is a continuous one-to-one function from (0,1) onto [0,1].
How to prove or disprove each choice?