Discuss / Python / 交作业

交作业

Topic source

崆峒奇兵

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

delta = b*b-4*a*c

    if delta >= 0:

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

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

        return x1,x2

    else:

        return "无实数解"


  • 1

Reply