How does environment determine the sex of a newborn in some organisms?

In almost all the organisms like humans, birds, lizards etc the sex of the newborn depends upon the chromosomes inherited from the parents. But in few species of reptiles like turtles and crocodiles, the sex of the new born depends upon the environment just after fertilization has taken place. In these organisms, the temperature at which the eggs are incubated determines the sex of the offspring. Low temperature after fertilization produces one sex and slightly high-temperature results in another.


19