user
Write a response that appropriately completes the request.

### Instruction:
Compare and contrast the differences between a coral reef and a tropical rainforest.

### Response:
assistant
Coral reefs and tropical rainforests are two unique ecosystems that are home to a wide array of species. Most notably, coral reefs are marine habitats, while rainforests are terrestrial, though both are highly biodiverse and support a large number of endemic species. Coral reef ecosystems are composed of coral reefs and the organisms and other species that inhabit them. The coral is formed by tiny, invertebrate animals called polyps that form colonies and excrete calcium carbonate to create skeletal structures. The coral reef eco-system is highly dependent on the presence of sunlight, temperature, and water quality, producing an environment in which a variety of fish, mollusks, and other small organisms can thrive. Tropical rainforests, on the other hand, are characterized by hot and humid climates filled with a variety of plants, animals, fish, reptiles, and invertebrates. Rainforests are some of the most diverse ecosystems in the world, but are also some of the most fragile, as deforestation or even changes in temperature due to climate change can cause wide-scale destruction. Whereas coral reefs can be found along coastlines around the world, tropical rainforests are limited to locations around the equator. Both ecosystems are vital to the health of our planet and its inhabitants, but vary greatly in both the ecosystem and the species found within them.