Let us consider a cylinder fitted with a piston containing an ideal gas inside it.And we give some amount of heat energy to the system. Assuming ideal condition , if the piston's velocity remains effectively zero throughout then a part of the heat given is utilized to increase the internal energy and the rest is utilized by the gas in doing work.But the gas is doing work on the piston still it's speed remains effectively zero i.e. it's kinetic energy is not changing . Then in which form does the rest part of energy gets converted into?
Under the described conditions, the work, performed by the gas, won't be zero only if the external pressure is not zero, in which case, the work would be performed against that pressure.
This work could be converted to a mechanical energy (lifting a weight), to an internal energy of a fluid, compressed by the piston, or some other form of energy.