Just teach kids to how to prove things, then teach how their proofs can be interpreted as programs. You can combine this with the study of mathematics. For example, “completing the square” algorithm is encoded in the quadratic formula, and studying that formula is studying of programs.
Completing the square is boring. This example is fun!