34 lines
949 B
Python
34 lines
949 B
Python
#!/usr/bin/env python
|
|
# encoding: utf-8
|
|
|
|
|
|
from random_expression import RdExpression
|
|
|
|
|
|
fact1 = RdExpression("{c}({a}x + {b}) + {f}({a}x + {b})",\
|
|
conditions = ["{b} > 0"])
|
|
|
|
fact2 = RdExpression("({a}x + {b})({c}x - {d}) + ({a}x + {b})({e}x + {f})",\
|
|
conditions = ["{b} > 0", "{d} > 0", "{f} > 0", "{e} != {c}"] )
|
|
|
|
fact3 = RdExpression("({a}x + {b})({c}x - {d}) + ({c}x - {d})({e}x - {f})",\
|
|
conditions = ["{b} > 0", "{d} > 0", "{f} > 0", "{d} != {f}"] )
|
|
|
|
id_rmq1 = RdExpression("{a**2}x^2 + {2*a*b}x + {b**2}",\
|
|
conditions = ["{a} > 0", "{b} > 0"])
|
|
|
|
id_rmq2 = RdExpression("{a**2}x^2 - {2*a*b}x + {b**2}",\
|
|
conditions = ["{a} > 0", "{b} > 0"])
|
|
|
|
|
|
fact = {"fact1" : fact1,\
|
|
"fact2": fact2, \
|
|
"fact3": fact3, \
|
|
"id_rmq1":id_rmq1, \
|
|
"id_rmq2":id_rmq2}
|
|
|
|
# -----------------------------
|
|
# Reglages pour 'vim'
|
|
# vim:set autoindent expandtab tabstop=4 shiftwidth=4:
|
|
# cursor: 16 del
|