When the first reptiles arose from amphibians some 70 million years after the first amphibians appeared, they went a good way toward solving these problems. In fact, their solutions for these problems largely define what reptiles are.
First of all, these new-fangled reptiles could mate on dry land! Male reptiles came equipped with an ingenious appendage enabling them to insert sperm inside the female's body. Moreover, inside the female, an eggshell was formed around the developing embryo, and this enabled the egg to be laid on dry land -- something impossible for primitive amphibian eggs. Dry-land nests can be better defended than an amphibian's typically gelatinous egg-mass simply extruded into water.
water snake showing scales on face
With regard to the second problem, that of retaining water in their bodies, the Gray Rat Snake at the right clearly shows the reptilian "invention" that helped solve that problem: These new reptiles were covered with fairly waterproof scales, so that water stayed inside their bodies much better than it did in the amphibians'. In the picture, each of those little blocky things covering the entire head is a scale.
The third problem, that of keeping the body warm when air temperature grew cold, was not overcome by the reptiles. Or, maybe it was in some of them... All of today's reptiles are thought to be "cold blooded," but some paleontologists believe that at least a few species of dinosaurs, which were reptiles, were able to keep their body temperatures up when cold weather arrived -- that they were "warm blooded." The debate of whether some dinosaurs were warm blooded is still going on.
These epoch-making advancements of reptiles over amphibians were so beneficial to reptiles that for many millions of years reptiles "ruled the earth." Probably you've heard of the Age of Dinosaurs. If an evolutionary biologist from another planet had visited Earth during the Jurassic period 150,000,000 years ago, he, she, or it surely would have assumed that eventually descendants of the reptiles would be the first Earthlings to set foot on the Moon, and to invent computers.
However, something happened about 65 million years ago that killed off all the great dinosaurs, and many other life forms as well. Was it a comet hitting the earth? Or did the first mammals, which were small rat-like things, eat all the dinosaurs' eggs? Or something else? This is one of the most intriguing of all questions concerning the evolution of life on earth.
Whatever the cause of the massive extinction of dinosaurs, today most kinds of reptiles that ever evolved are now extinct, including whole reptilian types, such as dinosaurs, flying reptiles and ichthyosaurs. Today, only the following four orders of reptile survive: