Note that quadratic degrees of freedom include translational, rotational, and vibrational types of energies, which are quadratic in velocity, angular velocity, and displacement respectively. Helium is monotomic and therefore has only three translational degrees of freedom: \(f=3\). Oxygen and nitrogen are both diatomic and thus have three translational degrees of freedom and two rotational degrees of freedom: \(f=5\).
The seven diatomic gases can be remembered with the expression, "BrINClHOF!", which indicates that bromine, iodine, nitrogen, chlorine, hyrogen, oxygen, and fluorine are diatomic gases.