Answer
See explanations.
Work Step by Step
a. Step 1. We can show that the function
$f(x)=\begin{cases} 1\hspace1cm rational-x \\0\hspace1cm irrational-x \end{cases}$
is discontinuous at every point by negating any assumptions that the function is continuous at a point.
Step 2. Assume the function is continuous at a point with rational x value. We have $f(x)=1$. Because every non-empty interval of real numbers contains both rational and irrational numbers, for a value $\epsilon=1/2$, we can find an irrational x-value $x_1$ in the interval of $(0,\epsilon)$ such that $f(x_1)=0$ and $|f(x_1)-1|=1\gt\epsilon$ which negates the assumption.
Step 3. Similarly, assume the function is continuous at a point with an irrational x value. We have $f(x)=0$. Because every nonempty interval of real numbers contains both rational and irrational numbers, for a value $\epsilon=1/2$, we can find a rational x-value $x_2$ in the interval of $(0,\epsilon)$ such that $f(x_2)=1$ and $|f(x_2)-0|=1\gt\epsilon$ which negates the assumption.
Step 4. We can conclude that the function $f(x)$ is discontinuous at every point.
b. Because the function $f(x)$ is discontinuous at every point, neither the right-hand or left-hand limits exist at every point, and the function is neither right-continuous or left-continuous at any point.