Solution:
(i) $f\left(\frac{1}{2}\right)$
Here, $x=1 / 2$, which is rational
$\therefore f(1 / 2)=1$
(ii) $\mathrm{f}(\sqrt{2})$
Here, $x=\sqrt{2}$, which is irrational
$\therefore f(\sqrt{2})=-1$
Solution:
(i) $f\left(\frac{1}{2}\right)$
Here, $x=1 / 2$, which is rational
$\therefore f(1 / 2)=1$
(ii) $\mathrm{f}(\sqrt{2})$
Here, $x=\sqrt{2}$, which is irrational
$\therefore f(\sqrt{2})=-1$