Metric space where each continuous function has IVP is connected The question:
Let $X$ be a space such that every continuous function $f:X\rightarrow\mathbb{R} $ does have the following property:
if $a<c<b$, $f(x) =a$, and $f(y) =b$, then there exists $z\in X$ such that $f(z) = c$. Prove that X is connected. 
My answer:
All continuous functions have the IVP which means that they (the continuous functions) do not map to a two point discrete space which implies connectedness.
Is this correct? 
 A: You are on the right track, but perhaps you should explain how  your answer relates to functions from $X$ to the reals.
If $X=A\cup B$ where $A, B$ are each open and non-empty with $A\cap B=\emptyset$ , let $f(x)=0$ for $x\in A$ and $f(x)=1$ for $x\in B.$ 
If $U$ is an open subset of the reals then $f^{-1}U$ is one of $\emptyset, A,B,X$, so $f^{-1}U$ is open in $X,$ so $f$ is continuous.
Since $A\ne \emptyset \ne B$, there exists $x\in A$ and $y\in B,$ that is, $f(x)=0$ and $f(y)=1.$ Obviously no $z\in X$ satisfies $f(z)=1/2.$
So your condition on the set of continuous  $f : X\to R$ implies that $X$ must be connected.... Note that the converse also holds, because jf $X$ is connected, then any continuous image of $X$ is connected.
A: I think what's missing in your proof is showing that, if $X$ is not connected, there is some continuous function that maps $X$ to a two point discrete space (hint: what can you say of the connected components of $X$?).
A: Your conjecture is FALSE even in a much stronger version. I'll let you think about it but it's not completely trivial.
It's possible that space $\ X\ $ which has more than one point has no non-trivial connected components (i.e. only 1-point components), and still your Darboux kind of property may hold.
