Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import cmath
- a=int(input("Enter a: "))
- b=int(input("Enter b: "))
- c=int(input("Enter c: "))
- d = (b**2) - (4*a*c)
- s1 = (-b-cmath.sqrt(d))/(2*a)
- s2 = (-b+cmath.sqrt(d))/(2*a)
- print('The Roots are {0} and {1}'.format(s1,s2))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement