求指导,哪里不对
Topic source补充:结果是这样
Result
There exists two roots: -0.5 -1.0 None There exists two roots: -0.5 -1.0 None There exists two roots: 1.0 -4.0 None
- 1
补充:结果是这样
Result
There exists two roots: -0.5 -1.0 None There exists two roots: -0.5 -1.0 None There exists two roots: 1.0 -4.0 None
一只萌萌哒吃土少女
-- coding: utf-8 --
import math
def quadratic(a, b, c): d1 = 2a d2 = bb-4ac d3 = math.sqrt(d2)
print(quadratic(2, 3, 1))