4. A pendulum bob of mass m on a cord of length L is pulled sideways until the cord makes an angle θ with the vertical as shown in the figure to the right. The change in potential energy of the bob during the displacement is:
(A) mgL(1−cosθ)
(B) mgL(1−sinθ)
(C) mgLsinθ
(D) mgLcosθ
