=>PYTHONTEX#py#default#default#0#code#####12#
import random
from sympy import Symbol
from sympy import expand
x=Symbol('x')
print('\\begin{align*}')
for n in range(10):
    a = random.choice([1, -1]) * random.randint(2, 9)
    b = random.choice([1, -1]) * random.randint(2, 9)
    c = random.choice([1, -1]) * random.randint(2, 9)
    d = random.choice([1, -1]) * random.randint(2, 9)
    e = (a*x+b)*(c*x+d)
    print('\\StrSubstitute{',e,'}{*}{}',' & = \\StrSubstitute{',expand(e),'}{**}{^}[\\result]\\StrSubstitute{\\result}{*}{}\\\\')
print('\\end{align*}')
=>PYTHONTEX:SETTINGS#
version=0.16
outputdir=pythontex-files-Développements-aléatoires-(pythontex)
workingdir=.
workingdirset=false
gobble=none
rerun=default
hashdependencies=default
makestderr=false
stderrfilename=full
keeptemps=none
pyfuture=default
pyconfuture=none
pygments=true
pygglobal=:GLOBAL||
fvextfile=-1
pyconbanner=none
pyconfilename=stdin
depythontex=false
pygfamily=py|python|
pygfamily=pycon|pycon|
pygfamily=sympy|python|
pygfamily=sympycon|pycon|
pygfamily=pylab|python|
pygfamily=pylabcon|pycon|
