I'm a complete beginner and for some reason when I try to run the code it says that there's a math domain error. I don't really understand what the problem is, help would be greatly appreciated:)
a = float(input('Rentrer la valeur de a : '))
b = float(input('Rentrer la valuer de b : '))
c = float(input('Rentrer la valuer de c : '))
delta = b**2 - 4*a*c
x1 = ((-b) + sqrt(delta)) / (2*a)
x2 = ((-b) - sqrt(delta)) / (2*a)
console:
Traceback (most recent call last):
File "main.py", line 31, in <module>
x1 = ((-b) + sqrt(delta)) / (2*a)
ValueError: math domain error
question from:https://stackoverflow.com/questions/65944316/math-domain-error-python-for-quadratic-equation