Discuss / Python / 做习题打卡

做习题打卡

Topic source

蜜蜂-Leo

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

  y=b**2-4*a*c

  if y<0:

    print('无解')

  else:

    temp = math.sqrt(y)

    x1 = (-b+temp)/2/a

    x2 = (-b-temp)/2/a

    return (x1, x2)


  • 1

Reply