Can you show that is a closed set?
Suppose f: D-R is continuous with D compact. prove that x: 0<=f(x)<=1 is compact.
what i got so far is that since D is compact, then D is closed and bounded. and f is uniformly continuous and f(D) is compact. but i dont how to show that x: 0<=f(x)<=1 is compact.
[0,1] is closed in R. Inverse image of closed set under continuous map is closed. Closed subset of a compact space is compact.
>then D is closed and bounded
That's already false since you don't have any relationship between D and R, I mean whether D is a subset of R or not. The Bolzano–Weierstrass theorem only applies when D is a subset of R^n