Answers for "type python fast"

-2

type python fast

def f(double x):
    return x ** 2 - x


def integrate_f(double a, double b, int N):
    cdef int i
    cdef double s, dx
    s = 0
    dx = (b - a) / N
    for i in range(N):
        s += f(a + i * dx)
    return s * dx
Posted by: Guest on March-28-2020

Python Answers by Framework

Browse Popular Code Answers by Language