At room temperature diatomic gas molecule has five degrees of freedom, at high temperature. It has seven degrees of freedom, explain?

At low temperature diatomic gas has three translational and two rotational degrees of freedom so, total number of degrees of freedom is 5.

But at high temperature gas molecule starts to vibrate which give two additional degrees of freedom i.e. 7.