Tension is the force which a gas always exerts when confined to a limited space. In the example, a partially…