To show that the function f is constant, we can use a proof by contradiction.
Assume that f is not constant. This means that there exist two distinct points a, b ∈ I such that f(a) ≠ f(b).
Since f is continuous on the interval I, by the Intermediate Value Theorem, for any value y between f(a) and f(b), there exists a point c ∈ (a, b) such that f(c) = y.
Since f(I) ⊂ Q, this means that for any y between f(a) and f(b), f(c) = y must be a rational number.
Now, consider the real numbers between f(a) and f(b), which include both rational and irrational numbers. By the density property of the real numbers, we can always find an irrational number z between any two distinct rational numbers.
However, this means that there exists an irrational number z between f(a) and f(b) such that there is no point c ∈ (a, b) such that f(c) = z.
This contradicts the fact that f is continuous on the interval I.
Therefore, our assumption that f is not constant must be false, and thus f is constant.
Answer: f is constant.