Code Python utilisant matplotlib et sympy

Programmes (modules, scripts) Python

C:\PROJECTS_ID3\STAGE_3E_2016\SOURCE
+---hello
|       hello.py
|
+---pylab
|     exos.ipynb
|     exo_factor.py
|     exo_plot.py

Le module Python source/pylab/exo_factor.py

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
"""Exemples de code Python basés sur sympy.

- sympy (http://docs.sympy.org/latest/index.html)

"""

from sympy import Symbol
from sympy import factor


def exemple_factoriser():
    """Factorisation d'une expression en employant le module Python sympy"""
    x=Symbol('x')
    y=Symbol('y')
    expr1=x**2-y**2
    facteur1 = factor(expr1)
    print(facteur1)


if __name__ == '__main__':
    exemple_factoriser()