Discuss / Python / 支持Markdown的评论插件去哪了,快点回来

支持Markdown的评论插件去哪了,快点回来

Topic source
import math
def quadratic(a,b,c):
    for i in (a,b,c):
        if not isinstance(i,int):
            raise TypeError('格式错误,请填写整数数字')
    e=b*b-4*a*c
    if e<0 or c==0 :
        raise TypeError('函数不符合解根条件')
    d=math.sqrt(e)
    r1=(-b+d)/(2*a)
    r2=(-b-d)/(2*a)
    return (r1,r2)       

订正为a==0

import math
def quadratic(a,b,c):
    for i in (a,b,c):
        if not isinstance(i,int):
            raise TypeError('格式错误,请填写整数数字')
    e=b*b-4*a*c
    if e<0 or a==0 :
        raise TypeError('函数不符合解根条件')
    d=math.sqrt(e)
    r1=(-b+d)/(2*a)
    r2=(-b-d)/(2*a)
    return (r1,r2)    

`test`

## 试试

--

``

test

``

```python

test2

```

-

-

-

-


  • 1

Reply