Step 1: Analyze continuity at \( x = 0 \).
The function \( f(x) \) is discontinuous at any point, as the limit from rationals and irrationals does not agree. Therefore, \( f(x) \) is not continuous at 0. Hence, option (A) is false.
Step 2: Analyze continuity at \( x = \frac{\pi}{2} \).
The function \( f(x) \) is discontinuous at \( x = \frac{\pi}{2} \) because the limit does not exist for both rationals and irrationals. Hence, option (B) is false.
Step 3: Analyze Riemann integrability on \( [0, 1] \).
The function is not continuous anywhere on \( [0, 1] \) but has a bounded set of discontinuities, which makes it Riemann integrable. Since the function is 0 almost everywhere except at rationals, the integral is 0. Hence, option (D) is true.
Step 4: Conclusion.
The correct answer is (D) since \( f(x) \) is Riemann integrable on \( [0, 1] \) and the integral equals 0.