diff --git a/TP Listes Chainées/listechainee.py b/TP Listes Chainées/listechainee.py index a846416..93e640c 100644 --- a/TP Listes Chainées/listechainee.py +++ b/TP Listes Chainées/listechainee.py @@ -230,3 +230,6 @@ class polyCreux: LC.add(nodeMonome(-current2.coef, degre2)) current2 = current2.next return LC + + def __call__(self, x): + return self.evaluate(x) diff --git a/TP Listes Chainées/main.py b/TP Listes Chainées/main.py index 3972966..6a3189f 100644 --- a/TP Listes Chainées/main.py +++ b/TP Listes Chainées/main.py @@ -78,5 +78,9 @@ def test_polycreux(): print("affichage pc somme") pc.afficher() + e = pc3(1) + print(e) + print(pc(1) + pc(0)) + if __name__ == "__main__": main()