#-------------------------------------------------------------------------------
# Name:        module1
# Purpose:
#
# Author:      Windows
#
# Created:     05/02/2018
# Copyright:   (c) Windows 2018
# Licence:     <your licence>
#-------------------------------------------------------------------------------

from math import*

def f(x):
    return (3/16)*x**3-(9/8)*x**2+6

def distance(a,b,c,d):
    return sqrt((a-c)**2+(b-d)**2)


def longueur(p):
    long=0
    x=0
    while x<=4:
        long=long+distance(x,f(x),x+p,f(x+p))
        x=x+p
    return long

p=0.00001
l=longueur(p)
print("la longueur de la pente est ",l)



