How does the outside temperature affect the body temperature?
The outside temperature affects the body temperature because it the body temperature will try to regulate itself. For example, if the temperature outside is cold, the body will generate heat as much as possible to maintain a core temperature.
One of the biggest things that affects body temperature is illness. The rise in temperature is due to the body fighting infection. Exposure to extreme temperatures, either hot or cold, can affect the temperature of the body. The time of day can also affect the temperature of your body, which is generally higher later in the day.
For sperm production, the testes need to be slightly cooler than the normal body temperature and to achieve this they descend into the scrotum which is outside the body core. The testes are located outside the body in the scrotum, because sperm production requires a cooler temperature then the internal body temperature of animals.