import math
def main():
print ("this program find the real solution to a quadratic")
a, b, c=eval(input("please input the coefficients(a,b,c):"))
delta=b*b-4*a*c
if delta>=0:
delta=math.sqrt(delta)
root1=(-b+delta)/(2*a)
root2=(-b-delta)/(2*a)
print ("\nThe solution are:", root1,root2)
main()
this program find the real solution to a quadratic
please input the coefficients(a,b,c):2,6,1
The solution are: -0.17712434446770464 -2.8228756555322954