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()