Originally Posted by

**junipers232** Suppose that $\displaystyle A$ is a compact subset of $\displaystyle \mathbb{R}$ and $\displaystyle f: A \rightarrow \mathbb{R}$ is continuous. Prove that the set $\displaystyle \{x \in A | 0 \leq f(x) \leq 1 \}$ is a compact subset of $\displaystyle \mathbb{R}$.

I know that the set $\displaystyle \{x \in A | 0 \leq f(x) \leq 1 \}$ is bounded because $\displaystyle A$ is bounded, so I guess I just need to prove that $\displaystyle \{x \in A | 0 \leq f(x) \leq 1 \}$ is closed. I was thinking to take a sequence in the set and show that it converges in the set. This is what is confusing me because I don't know how to do this part. Thanks for any help in advance.