Starting Files
Download this zip with the problem inside!
The Problem
def quadratic_formula(a, b, c): """Given the coefficients a, b, c of a quadratic equation ax^2 + bx + c, calculate the zeros of the equation using the quadratic formula. You can assume that all the quadratic equation have real roots. An operator named sqrt has been defined for you to use. >>> quadratic_formula(1, 0, 0) # x^2 [0.0, 0.0] >>> quadratic_formula(1, 0, 4) # x^2  4 [2.0, 2.0] >>> quadratic_formula(3, 2, 10) # 3x^2 + 2x  10 [2.189254787610007, 1.5225881209433405] """ d = (b**2)  (4*a*c) first_zero = ________________ # Write an expression for the first zero here second_zero = _________________ # Write an expression for the second zero here return sorted([first_zero, second_zero])
Given the coefficients a, b, c of a quadratic equation ax^2 + bx + c, calculate the zeros of the equation using the quadratic formula.
You can assume that all the quadratic equation have real roots.
Recall that the quadratic formula is:
(1)
Upload your screenshot here!
Upload files





