DISCLAIMER:
The code is for educational purposes only. You can use it for educational purposes only not for commercial uses.
A red giant is a luminous giant star of low or intermediate mass (roughly 0.3–8 solar masses (M☉)) in a late phase of stellar evolution. The outer atmosphere is inflated and tenuous, making the radius large and the surface temperature around 5,000 K (4,700 °C; 8,500 °F) or lower. The appearance of the red giant is from yellow-orange to red, including the spectral types K and M, but also class S stars and most carbon stars.