Is there an example of a non-compact and connected space $X$ such that constant functions are the only continuous functions from $X$ to $\mathbb{R}$ with the usual topology?
If the answer is "yes", I wonder under which conditions a non-compact and connected space possesses a non-constant continuous real-valued function.
Here are the related questions: Existence of non-constant continuous functions and Topological space $X$ which the set of non-constant real-valued continuous function on $X$ is empty.
Thank you.