Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

formatting an output as a numbered equation

Hi there, As by now and after googling for some time I didn't manage to find a option on how to format my dagemath outpiuts as numbered equation. Consider this very basic example:

a=randint(-100,100)
b=randint(-100,100)
c=randint(-100,100)
s=solve(a*x^2+b*x+c==0,x)
ex1=latex(r"\noindent Consider this  equation : ")
ex2='$$'+latex(a*x^2 + b*x +c ==0) +'$$'
ex3=latex("Solution : ")
ex4='$$'+latex(s)+'$$'
ex1 + ex2 + ex3 +ex4

I just need the equation to be included in an "equation" environment. One can see from my print that I'm at the very beginning stage in learning. Thx in advance for the help.