Write a program that animates a pendulum swinging, as shown in Figure. Press the UP arrow key to increase the speed and the DOWN key to decrease it. Press the S key to stop animation and the R key to resume it.

Exercise animates a pendulum swinging.
We need at least 10 more requests to produce the solution.
0 / 10 have requested this problem solution
The more requests, the faster the answer.