The relation between temperature and pressure is called the "equation of state of the gas". or "Hydrostatic equilibrium in ordinary star". Take for example a balloon, it will have a larger spherical shape, if the pressure inside exerted by the gas on a wall of a balloon balance the inward force exerted by the outside atmospheric pressure. In a dying star which is being compressed by gravity, the gas is being squeezed so the molecules is moving rapidly, resulting to a very high temperature, and this provide a balance that counteract or balances the compressive force of gravity. The very high temperature inside the star is needed to balance the force of gravity, and it is provide by "nuclear fusion energy" or else the star would collapse under the force of gravity. Depending on the size or mass of the star, it will either become, a "neutron star" or a "black hole".
When you say full valence shell, are you talking about a valence electron shell?
I am learning about atoms and i know a little bit
The answer true I’m guessing. It’s a 50/50 chance