In your code you imported math but used cmath. But, a simpler solution would be to not import anything and use the built in power function. Also, python handles printing integers, floats, and complex numbers by itself, so you don't need to worry about casting.
Try this:
# Get inputs
a = float(input("a: "))
b = float(input("b: "))
c = float(input("c: "))
# Calculate discriminant
discriminant = b**2 - 4*a*c
# Get solutions, x^0.5 = square root
x1 = (-b + discriminant**0.5) / (2*a)
x2 = (-b - discriminant**0.5) / (2*a)
# Output
print(f"Solutions: {x1} and {x2}")
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…