Discuss / Python / 123

q810448340

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

``` 在此插入代码

```import math

def quadratic(a,b,c): Q = b b - 4 a c W = ((-b) + math.sqrt(Q)) / (2a),((-b) - math.sqrt(Q)) / (2a) if Q < 0: print("False") elif Q ==0: return (((-b) + math.sqrt(Q)) / (2a)) elif Q > 0: return W else: print("Try again!")

print(quadratic(1,3,-4))


  • 1

Reply