Find all rational numbers $k$ such that $0 \le k \le \frac{1}{2}$ and $\cos k \pi$ is rational.
1. We start by considering the rational number \( k \) such that \( 0 \le k \le \frac{1}{2} \) and \( \cos(k\pi) \) is rational. We need to find all such \( k \).

2. Let \( k = \frac{m}{n} \) where \( m \) and \( n \) are coprime integers. Then, \( \cos(k\pi) = \cos\left(\frac{m\pi}{n}\right) \).

3. Consider the primitive \( n \)-th roots of unity, \( \zeta = e^{\frac{2\pi i m}{n}} \). These roots have an algebraic degree of \( \varphi(n) \), where \( \varphi \) is the Euler's totient function.

4. Using the identity \( \cos\left(\frac{m\pi}{n}\right) = \frac{\zeta + \zeta^{-1}}{2} \), we can express \( 2 \cos\left(\frac{m\pi}{n}\right) = \zeta + \zeta^{-1} \).

5. The number \( \zeta \) is a root of the polynomial \( x^2 - 2\cos\left(\frac{m\pi}{n}\right)x + 1 = 0 \). This polynomial has rational coefficients if and only if \( \cos\left(\frac{m\pi}{n}\right) \) is rational.

6. The degree of the field extension \(\mathbb{Q}(\zeta) / \mathbb{Q}(\cos\left(\frac{m\pi}{n}\right))\) is either 1 or 2. If \( n > 2 \), then \( \zeta \) is non-real, but \( \cos\left(\frac{m\pi}{n}\right) \) is real, implying that the degree is 2.

7. Therefore, the algebraic degree of \( \cos\left(\frac{m\pi}{n}\right) \) is \(\frac{\varphi(n)}{2}\) if \( n \geq 3 \). For \( \cos\left(\frac{m\pi}{n}\right) \) to be rational, \(\frac{\varphi(n)}{2}\) must be 1, which implies \(\varphi(n) = 2\).

8. The values of \( n \) for which \(\varphi(n) = 2\) are \( n = 3, 4, 6 \). Additionally, we must consider \( n = 1 \) and \( n = 2 \) separately.

9. For \( n = 1 \), \( k = 0 \) and \(\cos(0) = 1\), which is rational.

10. For \( n = 2 \), \( k = \frac{1}{2} \) and \(\cos\left(\frac{\pi}{2}\right) = 0\), which is rational.

11. For \( n = 3 \), \( k = \frac{1}{3} \) and \(\cos\left(\frac{\pi}{3}\right) = \frac{1}{2}\), which is rational.

12. For \( n = 4 \), \( k = \frac{1}{4} \) and \(\cos\left(\frac{\pi}{4}\right) = \frac{\sqrt{2}}{2}\), which is not rational.

13. For \( n = 6 \), \( k = \frac{1}{6} \) and \(\cos\left(\frac{\pi}{6}\right) = \frac{\sqrt{3}}{2}\), which is not rational.

14. Therefore, the rational values of \( k \) such that \( 0 \le k \le \frac{1}{2} \) and \( \cos(k\pi) \) is rational are \( k = 0, \frac{1}{2}, \frac{1}{3} \).

The final answer is \( \boxed{ k = 0, \frac{1}{2}, \frac{1}{3} } \).