Discuss / Python / 交作业

交作业

Topic source

Cccc-彩

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

m=b*b-4*a*c

    if m<0:

        return '无实根'

    x1=(-b+math.sqrt(m))/(2*a)

    x2=(-b-math.sqrt(m))/(2*a)

    if m==0:

        return x1

    else:

        return x1,x2


  • 1

Reply