According to the kinetic theory of gases the collision of the molecules of a gas…