Step 1: Recall Joule's law of heating.
Joule's law states that the heat produced in a resistor is directly proportional to the square of the current, the resistance, and the time for which the current flows. Mathematically, it is given by:
\[
H = I^2 R t
\]
where \( H \) is the heat produced (in Joules), \( I \) is the current (in Amperes), \( R \) is the resistance (in Ohms), and \( t \) is the time (in seconds).
Step 2: Identify the given values.
From the problem statement, we have:
Resistance, \( R = 4 \, \Omega \)
Electric current, \( I = 5 \, A \)
Time, \( t = 2 \, s \)
Step 3: Substitute the values into Joule's law formula.
\[
H = (5 \, A)^2 \times (4 \, \Omega) \times (2 \, s)
\]
\[
H = (25 \, A^2) \times (4 \, \Omega) \times (2 \, s)
\]
\[
H = 100 \, \Omega \cdot A^2 \times 2 \, s
\]
Step 4: Calculate the heat produced.
Since \( 1 \, \Omega \cdot A^2 \cdot s = 1 \, J \) (because \( V = IR \implies \text{Volt} = \text{Ampere} \times \text{Ohm} \) and \( P = VI = I^2 R \implies \text{Watt} = \text{Ampere}^2 \times \text{Ohm} \), and \( E = Pt \implies \text{Joule} = \text{Watt} \times \text{second} \)), we have:
\[
H = 200 \, J
\]
The heat produced in the resistor is \( 200 \, J \).