An integral:
can be approximated by the so-called Simpson’s rule:
Here `h = (b-a)/n`, `n` being an even integer and `a <= b`. 
We want to try Simpson's rule with the function f:
The task is to write a function called `simpson` with parameter `n` which returns the value of the integral of f on the interval `[0, pi]` (pi being 3.14159265359...).
## Notes:
- Don't round or truncate your results. See in "RUN EXAMPLES" the function `assertFuzzyEquals` or `testing`.
- `n` will always be even.
- We know that the exact value of the integral of f on the given interval is `2`.
You can see: 
about rectangle method and trapezoidal rule.
from math import sin
from math import pi

def f(x):
    return 3/2*(sin(x)**3)

def simpson(n):
    return pi/(3*n)*(f(0) + f(pi) + 4*sum(f((2*i - 1)*(pi/n))  for i in range(1,n//2+1)) + 2*sum(f(2*i*(pi/n)) for i in range(1,n//2)))

from math import sin
from math import pi

def f(x):
    return 3/2*(sin(x)**3)

def simpson(n):
    return pi/(3*n)*(f(0) + f(pi) + 4*sum(f((2*i - 1)*(pi/n))  for i in range(1,n//2+1)) + 2*sum(f(2*i*(pi/n)) for i in range(1,n//2)))
