import math def quadratic_equation(a, b, c): t = b * b - 4 * a * c if a == 0: x1 = -c / b return x1 elif t<0: return 'none' elif t >= 0: x2 = (-b / (2 * a)) + math.sqrt(t / (4 * a * a)) x3 = (-b / (2 * a)) - math.sqrt(t / (4 * a * a)) return x2, x3 print quadratic_equation(2, 3, 0) print quadratic_equation(1, -6, 5)
产品经理不是经理
产品经理不是经理
相关分类