c8tp3d.py

Created by manuel-eleve-tle-techno-indice2020

Created on May 15, 2020

308 Bytes


import matplotlib.pyplot as plt



def Aire_trap(n):

    h=1/n

    x=0

    for k in range(n):

        b=f(x)

        B=f(x+h)

        # construction du trapèze

        trap=plt.plot([x,x,x+h,x+h,x],[0,f(x),f(x+h),0,0],color='orange')

        x=x+h

    # affichage    

    plt.show()