1. Let $\displaystyle f : [0,1] \rightarrow [0,1]$ be continuous. Prove that f has a fixed point.

2. let $\displaystyle f: (0,1] \rightarrow (0,1]$ be continuous. Give a counterexample to show that f need not have a fixed point.

For both the questions, I supposed a sequence $\displaystyle {x_n} = \frac{1}{n}$, which converges to 0, but this does not look correct. Can anyone tell how this is proved?