Let $(\mathbb{N},\tau)$ be a topological space, where $\tau=\{\emptyset, \mathbb{N}, \{0\},\{0,1\},\{0,1,2\},\dots\}$ I'm stuck here:

Let $(\mathbb{N},\tau)$ be a topological space, where
$$\tau=\{\emptyset, \mathbb{N}, \{0\},\{0,1\},\{0,1,2\},\dots\}$$
a) Prove that is not compact.
b) Prove that every continuous function $f: (\mathbb{N},\tau) \to \mathbb{R}$ is constant and hence bounded.

Part a) is easy: obviously $\tau$ without $\mathbb{N}$ and $\emptyset$ is a cover for $(\mathbb{N},\tau)$. Suppose that there's a finite subcovering for $\mathbb{N}$. Then we take the biggest set to see that the next element is not in this subcover and that it doesn't cover $\mathbb{N}$, so it's not compact.
Part b) is what I cannot see. How can I show that every continuous real valued set with domain that topological space is always constant?
Thanks for your time.
 A: If $f$ takes two different values, say $r$ and $s$, can you think of two open subsets of $\mathbb{R}$ that will lead to a contradiction?

According to a comment to this post, the above sentence alone did not constitute "an answer".
To supplement, I wrote a detailed answer. I changed it a bit:
Let $r=f(0)$ be the value of $f$ at $0$. Let $s\in\mathbb{R}\setminus\{ r \}$ be any other real number. We can choose an open neighborhood $U$ of $s$ in $\mathbb{R}$ which does not contain $r$. For example an open interval $U=(s-\epsilon,s+\epsilon)$ where $\epsilon$ is a positive real number not exceeding $|r-s|$. Now, because $f$ is contionuous, $f^{-1}[U]$ must be open in $(\mathbb{N},\tau)$, so $f^{-1}[U]\in\tau$. We cannot have $0\in f^{-1}[U]$ because $f(0)=r\notin U$. Looking at the list defining $\tau$, we conclude the only open set left is $\varnothing$, so $f^{-1}[U]=\varnothing$. This means that $f$ does not take any value in $U$, in particular $f$ does not take the value $s$. Since $s$ was arbitrary, $f$ takes no other value than $r$. So $f$ is the constant function $f\equiv r$.
This proof uses only the fact that the codomain of $f:(\mathbb{N},\tau)\to\mathbb{R}$ is a $T_1$ space, i.e. we do not require it to be Hausdorff ($T_2$).
A: If $a=f(m)\ne f(n)=b$, and $f$ is continuous, then the sets
$$
f^{-1}\Big(-\infty, \frac{a+b}{2}\Big), \quad
f^{-1}\Big(\frac{a+b}{2},\infty\Big)
$$ 
and open, disjoint and non-empty. No such sets in $\tau$.
A: Your argument for part $a)$ is correct.
$b)$ If $f$ is not constant then there exists $m,n \in \mathbb{N}$ such that $f(n) \neq f(m).$ Let $r=\frac {|f(n)-f(m)|}{4}>0.$ Then $U=(f(n)-r,f(n)+r)$ and $V=(f(m)-r,f(m)+r)$ are two disjoint non-empty open sets in $\mathbb{R}.$ $f$ is continuous therefore $f^{-1}(U)$ and $f^{-1}(V)$ is open in $\mathbb N.$ Since, $U$ and $V$ are disjoint therefore so are $f^{-1}(U)$ and $f^{-1}(V).$ This is a contradiction as your topology has no disjoint  non-empty open sets.
A: Let's prove by induction that $f(n) = f(0)$ for all $n \in \mathbb{N}$.
Base case: $f(0) = f(0)$.
Assume that $f(0) = f(1) = \ldots = f(n)$ for some $n \in \mathbb{N}$. We wish to prove $f(n+1) = f(0)$.
Assume $f(n+1) \ne f(0)$. As suggested by @Daniel Schepler, consider $B\big(f(n+1), |f(n+1) - f(0)|\big)$, the open interval centered at $f(n+1)$ with radius $|f(n+1) - f(0)|$. It is an open set in $\mathbb{R}$, so since $f$ is continuous, its preimage must be an open set in $(\mathbb{N}, \tau)$.
So, $$f^{-1}\left(B\big(f(n+1), |f(n+1) - f(0)|\big)\right) = \{0, 1, \ldots, m\}$$
for some $m \in \mathbb{N}$, because it is nonempty and $\ne \mathbb{N}$.
But then $f(0) \in B\big(f(n+1), |f(n+1) - f(0)|\big)$ so:
$$|f(n+1) - f(0)| < |f(n+1) - f(0)|$$
which is a contradiction.
Hence $f(n+1) = f(0)$ so $f$ is constant.
