Problem: If $f(x)=n$, where $n$ is an integer such that $n\le x\lt n+1$, what is the range of $f(x)$?
The answer in the book is the set of all integers. Since this is the answer, isn't $f(x)=n$ enough information to solve this problem? What is the point of the problem having the $n\le x\lt n+1$ part?
The point is to tell you what function $f$ refers to.
For example, it tells you that $f(4.3)$ is equal to that integer value of $n$ for which $n \leq 4.3 < n + 1$. So $f(4.3) = 4$. Similarly, $f(2.5) = 2$, $f(7) = 7$, $f(-3.9) = -4$, and so on.
If it just said $f(x) = n$, $f$ would be a constant function equal to some unspecified integer $n$. For example, if $n$ were $5$, then we'd have $f(4.3) = 5$, $f(2.5) = 5$, $f(7) = 5$, $f(-3.9) = 5$.