Simulating SHM of a simple pendulum using Python