Discuss / Python / return (-b+math.sqrt(b*b-4*a*c))/2/a , (-b-math.sqrt(b*b-4*a*c))/2/a

return (-b+math.sqrt(b*b-4*a*c))/2/a , (-b-math.sqrt(b*b-4*a*c))/2/a

Topic source

import math

def quadratic(a, b, c):

    return (-b+math.sqrt(b*b-4*a*c))/2/a , (-b-math.sqrt(b*b-4*a*c))/2/a


  • 1

Reply