If we then remove the weights, holding a constant volume, we proceed on to State 2. Using either process we change the state of the gas from State 1 to State 2. For the constant pressure path, the work is shown in solid yellow and yellow cross-hatch. The work for the constant pressure process is greater than the work for the curved line process. The work done by a gas not only depends on the initial and final states of the gas but also on the process used to change the state.
Different processes can produce the same state, but produce different amounts of work.