Logo Les Interros des Lycées
acidefaible4.py
Programme Python de l'Interros des Lycées
import numpy as np, matplotlib.pyplot as plt
def Distributions (pH, pKa):
    E=10**(pKa-pH)
    a = E/(E+1)
    b = 1/(E+1)
    return a,b
pH = np.linspace (0,14)
acide, base = Distributions (pH, 5.0)
plt.plot(pH,acide,'b')
plt.plot(pH,base ,'b--')
plt.show()