The constant Fourier coefficient $a_0$ for a $2\pi$–periodic function is given by:
\[
a_0=\frac{1}{2\pi}\int_{-\pi}^{\pi} f(x)\,dx
\]
Split the integral across the two intervals where $f(x)$ is defined:
\[
\int_{-\pi}^{\pi} f(x)\,dx
= \int_{-\pi}^{0} (-k)\,dx + \int_{0}^{\pi} k\,dx
\]
Evaluate the first integral:
\[
\int_{-\pi}^{0} (-k)\,dx = -k(0 - (-\pi)) = -k(\pi)
\]
Evaluate the second integral:
\[
\int_{0}^{\pi} k\,dx = k(\pi - 0) = k\pi
\]
Add both contributions:
\[
-k\pi + k\pi = 0
\]
Thus the total integral is zero, giving:
\[
a_0 = \frac{1}{2\pi}(0) = 0
\]
Therefore the constant term of the Fourier series is zero.
Final Answer: 0