I have to show that $(0,1) \simeq [0,1] $ but not homeomorphic, where $\simeq $ means homotopically equivalent.
I have done the not homeomorphic part by showing that $(0,1)$ is not compact but $[0,1] $ is compact.
Now the problem is that how to show that they are homotopically equivalent, i.e. $$ f:(0,1)\rightarrow [0,1]\ \text{and } g:[0,1]\rightarrow (0,1) $$ are two continuous function s.t. $$ gf\simeq1_{(0,1)}\ \text{and} fg\simeq 1_{[0,1]} $$ where $ 1_{(0,1)} $ and $1_{[0,1]}$ are respective identities.