I am asked to show that the following property does not hold if $\mathbb{R}$ were replaced by $\mathbb{Q}$:
Let $f:[a,b] \rightarrow \mathbb{R}$ be a continous function defined on the closed interval $[a,b]$. Then $f$ is bounded and $f$ will reach a minimum and maximum on $[a,b]$.
In order to show that this does not account for $\mathbb{Q}$, take $a$, $b \in \mathbb{Q}$ and and find examples of continuous functions $f: \{x \in \mathbb{Q} \mid a \leq x \leq b \} \rightarrow \mathbb{Q}$ that $(a)$ are not bounded, (b) are bounded, but do not reach their minimum and/or maximum value.
Are the following examples correct?
$(a)$ $f: \{ x \in \mathbb{Q} \mid 3 \leq x \leq 4 \} \rightarrow \mathbb{Q} : x \mapsto \frac{1}{{\pi-x}}$
$(b)$ $f: \{ x \in \mathbb{Q} \mid \frac{\pi}{4} \leq x \leq \frac{3\pi}{4} \} \rightarrow\mathbb{Q}:x\mapsto \sin(x)$
Those examples don't work, since they don't necessarily output a rational number when you input a rational number in $[a,b]$. For example, $1\in \mathbb Q \cap [\frac \pi 4, \frac {3\pi} 4]$ but $\sin(1)\notin \mathbb Q$. We want functions whose codomain is $\mathbb Q$.
For example, let $f: [0,2]\cap \mathbb Q \to \mathbb Q$ such that $f(x) = \frac{1}{x^2-2}$. If $f$ were defined on $\mathbb R\setminus \{\sqrt 2\}$, then $f$ would go to $\pm \infty$ as $x$ approaches $\sqrt 2$. But, of course, $\sqrt 2\notin \mathbb Q$. $f$ is continuous, since $f$ is the quotient of continuous functions where the denominator is nonzero everywhere on the domain. However, $f$ is unbounded, since rational numbers in the domain can be arbitrarily close to $\sqrt 2$, causing the function to achieve values which are arbitrarily large or small. Consequently, $f$ has no minimum or maximum.