What are the two principle functions of the testes?

The two principle functions of the testes is the production of sperm and the production of sex hormones (mainly testosterone).