The work done on a gas during compression or expansion at constant pressure is given by:
\[
W = - P \Delta V
\]
Where:
- \( P = 2 \, \text{atm} \) is the pressure,
- \( \Delta V = V_f - V_i \) is the change in volume,
- \( V_i = 10 \, \text{L} \) is the initial volume,
- \( V_f = 5 \, \text{L} \) is the final volume.
Now, calculate the work done:
\[
\Delta V = 5 - 10 = -5 \, \text{L}
\]
\[
W = - 2 \times (-5) = 10 \, \text{L} \cdot \text{atm}
\]
Thus, the work done on the gas is \( 20 \, \text{L} \cdot \text{atm} \).