Discuss / Python / 脚本内容

脚本内容

Topic source

diska本尊

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

import math

def quadratic(a, b, c): x = b*b - 4*a*c if x >= 0: y1 = (-b + math.sqrt(x))/ (2*a) y2 = (-b - math.sqrt(x))/ (2*a) else: return "无实根" return y1, y2


  • 1

Reply