Factoring Polynomials

Gabriel Genellina gagsl-py2 at yahoo.com.ar
Thu Dec 18 19:11:23 EST 2008


En Thu, 18 Dec 2008 17:37:35 -0200, <collin.day.0 at gmail.com> escribió:

> I am trying to write a simple application to factor polynomials. I
> wrote (simple) raw_input lines to collect the a, b, and c values from
> the user, but I dont know how to implement the quadratic equation
>
> x = (-b +or- (b^2 - 4ac)^1/2) / 2a
>
> into python. Any ideas?

Read the section on "Numeric Types" (under "Built-in Types") in the
Library Reference: http://docs.python.org/library/index.html
Then you should be able to write two expressions to evaluate your formula
above.

-- 
Gabriel Genellina




More information about the Python-list mailing list