The average kinetic energy of the molecules of a perfect gas is directly proportional to…