Trinomial Solver

/ 27 Oct 2013 /
Aaaaaaand here is my first program in like 3 weeks, well, in Python at least, pretty simple but idc, till next time.



from math import sqrt
def tri(a, b, c):
    x = (-b)-sqrt(b**2-(4*a*c))
    y = 2*a
    x2 = (-b)+sqrt(b**2-(4*a*c))
    q = x/y
    q2 = x2/y
    print('{:.2f}'.format(q))
    print('{:.2f}'.format(q2))

 
Copyright © 2010 M(ath)+me, All rights reserved