Kinetic theory assigns a degree of freedom to every quadratic term involving momentum (linear, rotational/angular, vibrational) and every quadratic term involving the cartesian co-ordinates appearing in the expression for the total energy for a molecule.
The Equipartition of Energy theorem then says that for a system in thermal equilibrium, each degree of freedom has an average energy of $k_BT/2$, where $T$ is the absolute temperature and $k_B$ is Boltzmann's constant.
If a molecule has $f$ degrees of freedom then the total energy of a molecule
is
$$E_{molecule} = \frac{f}{2}k_BT\,.
$$
However, there is a problem since each degree of freedom a molecule can possibly possess does not always contribute to its energy. This is because the contribution by the degrees of freedom to the energy of a molecule depends on the temperature of the gas.
In the case of H$_2$, for example, at low temperatures (30 K) only translational degrees of freedom contribute to a molecule's energy but at 300 K both translational and rotational degrees of freedom contribute. Looking at hydrogen, it has 3 translational, 3 rotational (rotation about x, y and z axes) and 2 vibrational degrees of freedom. The three translational degrees of freedom contribute at 300 K but only 2 rotational degrees of freedom contribute to the energy of a molecule and to the specific heat at constant volume of the gas. The third rotational degree of freedom does not contribute because the energy $k_BT/2$ is small compared to the energy levels that quantum mechanics says a molecule can have for rotation about the axis along the bond that joins the atoms making up the molecule. (See also this link https://physics.stackexchange.com/a/168945/168935 .) The vibrational degrees of freedom are activated when the temperature reaches 5000 K, and are activated for the same reason.
The same general argument applies to a chlorine gas molecule