2. (10%) Let $f(x)$ be a function defined by

$$f(x) = \begin{cases} x & \text{if } x \text{ is rational,} \\ 0 & \text{if } x \text{ is irrational.} \end{cases}$$

Where is the function continuous? Why?