The formula for degree of freedom is given by
f=3N−k
where N is the number of particles, k is the individual relationship in the system.
For a monoatomic gas particle, N=1,k=0. So, f=3
Hence, monoatomic gas has 3 translational degree of freedom.
For a rigid diatomic gas molecule, there are 5 degrees of freedom, 3 translational and 2 rotational. A diatomic gas can have two extra degrees of freedom due to rotation along two independent axes.
A non rigid diatomic molecule has one extra degree of freedom than a rigid one. This is the vibrational degree of freedom. Hence, it has 6 degrees of freedom.
So, a non rigid diatomic gas has 3 translational, 2 rotational and 1 vibrational degrees of freedom.
A polyatomic gas has more than two atoms per molecule. Hence, the total number of degrees of freedom is 3 translational, 3 rotational and more than one vibrational degree of freedom.