Learning the fundamentals of computer programming teaches computational thinking. Computational thinking is a problem solving process that includes a number of characteristics such as logically ordering and analyzing data and creating solutions using a series of ordered steps (algorithms) and dispositions, such as the ability to confidently deal with complexity and open-ended problems.
Learning to write code also teaches critical thinking, problem solving and logic. It has positive impacts on all aspects of academic achievement, with an emphasis on math skills.
Click on the link below to access a study from Brigham Young University that measured the benefits of learning to write code.