Margaret Hamilton, as Director of Software Engineering for the Apollo program, led the team that developed the Lunar Module's guidance computer software. The commonly cited figure is approximately 65,000 lines of code for the lunar module's onboard software.
However, it's important to note that Hamilton led the team that wrote this code rather than writing it all herself—she was the director overseeing the software effort. Her critical contribution was establishing rigorous software engineering practices, error handling, and testing protocols that were novel for the time and helped ensure the mission's success. Her work fundamentally elevated software engineering as a discipline and earned her the Presidential Medal of Freedom in 2016.