lst = input("Enter a,b,c: ").split(",")
a = float(lst[0])
b = float(lst[1])
c = float(lst[2])
root1 = (-b + ((b**2-(4*a*c))**0.5))/(2*a)
root2 = (-b - ((b**2-(4*a*c))**0.5))/(2*a)
dis = b**2 - (4*a*c)
if dis > 0:
print("The roots are {} and {}".format(root1, root2))
elif dis < 0:
print("The equation has no real roots")
else:
print("The root is {}".format(root1))
I wrote my code in python 3.8. I hope this helps!