Answer and Explanation:
Total macroscopic workdone = Δ K.E
Where K.E = Kinetic Energy
Let V₁ = Initial speed of the block and
V₂ = Final speed of the block
Δ K.E = 1/2 MV₂² - 1/2 MV₁²
Δ K.E = 1/2M(V₂-V₁)²
Since the block was initially at rest, V₁ = 0
Since the block eventually stopped due to friction, V₂ = 0
Δ K.E = 1/2M * 0
Δ K.E = 0 Joules
N.B: The workdone by gravity is Mgh