Discuss / Python / Assignment

Assignment

Topic source

遥望君山

#1 Created at ... [Delete] [Delete and Lock User]
import math

def quadratic(a, b, c):
    def solve(sign=1):
        return (-b + sign*math.sqrt(b*b - 4*a*c))/(2*a)
    return solve(), solve(-1)

  • 1

Reply