Let $f:[1,10]\to \Bbb{Q}$ be a continuous function and $f(1)=10,$then $f(10)=?$
Suppose $f(10) = a \neq 10$ where $a$ is a rational. Then by the IVT, every real number between $a$ and $10$ is attained by the function in the interval $[1, 10]$. (Also, if we are strict since IVT usually requires real functions, we are using a generalization of IVT: continuous functions preserve connectedness.)
Now between every 2 distinct rationals, there is an irrational. So the function must have an irrational number in its image. But the codomain of the function is the rational numbers, so this is a contradiction. Hence $f(10) = 10$.
Credit to the comment above.