For constant speed, work done by the engine \( \text{WD}_{\text{engine}} \) + work done by friction \( \text{WD}_{\text{friction}} = 0 \) (by Work-Energy Theorem).
Thus, we can write:
\[
\text{WD}_{\text{engine}} = -\text{WD}_{\text{friction}} = -\left[ \mu m g x \right]
\]
where \( \mu = 0.04 \), \( m = 500 \, \text{kg} \), \( g = 9.8 \, \text{m/s}^2 \), and \( x = 4 \, \text{km} = 4 \times 10^3 \, \text{m} \).
So,
\[
\text{WD}_{\text{engine}} = -0.04 \times 500 \times 9.8 \times 4 \times 10^3 = 784 \, \text{KJ}.
\]
Thus, the work done by the engine is 784 KJ.
The heat generated in 1 minute between points A and B in the given circuit, when a battery of 9 V with internal resistance of 1 \(\Omega\) is connected across these points is ______ J. 
The given circuit works as: 