Now here if we obtain output work same as input thermal energy then it is 100% efficient
but this is only possible when we have no energy loss while it is not possible due to many reasons
one of the main cause of energy loss is friction
So when machine working there must be friction between its working parts due to which out input energy is lost in different parts and hence we can never be 100% efficient machine.