2. Let the line $y=a$ intersect the curve $y=\sin x(0 \leqslant x \leqslant \pi)$ at points $A$ and $B$. If $|A B|=\frac{\pi}{5}$, then $a=$ $\qquad$ (to 0.0001$)$.
2.0. 9511 .

Let $A(p, \sin p), B(q, \sin q)$, and
$$
0<p<\frac{\pi}{2}<q<\pi \text {. }
$$

Since $\sin p=\sin q=a$, we have $q=\pi-p$.
Given that $|A B|=\frac{\pi}{5}$, we have
$q-p=\pi-2 p=\frac{\pi}{5}$.
Therefore, $p=\frac{2 \pi}{5}$.
Using a TI calculator, we find $\sin \frac{2 \pi}{5} \approx 0.9511$.