developpement limit c3 a9 sinus python

Solutions on MaxInterview for developpement limit c3 a9 sinus python by the best coders in the world

showing results for - "developpement limit c3 a9 sinus python"
Frida
27 Apr 2019
1import math
2def sin(x,n):
3    z = 0
4    for i in range(n+1):
5        z = z + ( (-1)**i / math.factorial(2*i+1) ) * x**(2*i+1)
6    return float("{:.4f}".format(z))