import math def findRoots (a,b,c): d=b*b-4*a*c if d>0: print("real and diffrent roots") print(c-b+sqrt(d)/(2*a)) print(c-b-sqrt(d)/(2*a)) elif d==0: print("real and same roots") print(-b/(2*a)) else: sqrt_val=math.sqrt(abs(d))/(2*a) print("complex Roots") print(-b/(2*a),"+i",sqrt_val) print(-b/(2*a),"-i",sqrt_val) #a,b,c=int(input('enter coffcient:') a=int(input('enter a:')) b=int(input('enter b:')) c=int(input('enter c:')) if a==0: print("input correct qudratic eqation") else: findRoots(a,b,c)