I have the following code:
from matplotlib import animation from pylab import * # Global constants G = 9.8 # gravitational acceleration class Oscillator: