入力値を用いて、二次方程式を解いて出力を返すPythonの関数を書いてください。
def solve_quad(a, b, c):
    discriminant = (b**2 - (4 * a * c))
    # calculate the discriminant
    if discriminant < 0:
        # no real solutions
        return None
    elif discriminant == 0:
        # one real solution
        x = (-b + math.sqrt(discriminant)) / (2 * a)
        return x
    else:
        # two real solutions
        x1 = (-b + math.sqrt(discriminant)) / (2 * a)
        x2 = (-b - math.sqrt(discriminant)) / (2 * a)
        return x1, x2