python programming for numerical methods