作业
Topic source if not isinstance(a, (int, float)) or not isinstance(b, (int, float)) or not isinstance(c, (int, float)):
raise TypeError('bad operand type')
if b*b-4*a*c<0:
return
else:
x1 = (-b + math.sqrt(b**2 - 4*a*c))/ (2*a)
x2 = (-b - math.sqrt(b**2 - 4*a*c))/ (2*a)
return x1,x2
- 1
蓬易Lava