from math import * import matplotlib.pyplot as plt # Exploration des fonctions de variable réelle avec Python def f(x) : return x**2 - exp(x / 2) def courbe(f,a,b) : X = [] Y = [] for k in range(a, b + 1) : X.append(k) Y.append(f(k)) plt.plot(X,Y,"b-") plt.show() def courbe_pas(f, a, b, pas) : X = [] Y = [] while a < b : X.append(a) Y.append(f(a)) a = a + pas plt.plot(X,Y,"b-") plt.show()