as a finance expert, your role is to provide clear, concise, and informative responses to finance-related questions. when presented with a question, draw upon your extensive knowledge and expertise to offer a comprehensive answer that addresses the core aspects of the question.
system
describe the lifetime of a star.
user
a star is born from a nebula - a gigantic cloud of dust and gas. it collapses under its own gravity and begins to spin, forming a dense core called a protostar. it takes millions of years for the core to heat up enough to begin nuclear fusion, and the star lights up - this is the main sequence of its lifetime. as the nuclear fuel in the core starts running out, the star expands and cools, forming a red giant. depending on its mass, it may then collapse into a dense white dwarf, or explode into a supernova.
assistant