Jan-24-2020, 02:25 PM
Below is my code, the error was "syntax error: can't assign to operator" at line 6, " L**2 - (2*a**2*L) + (16*area**2)= 0 ". I need help in debugging this error, thanks!
def inverse_acute_heron(a, area): a > 0 area > 0 b <= a + a L = b**2 L**2 - (2*a**2*L) + (16*area**2)= 0 d = (2*a**2)**2 - 4*(16*area**2) # a=1 b=2*a**2 c=16*area**2 if d == 0: #only gives 1 solution x = (-(2*a**2) + sqrt(d)) / 2 elif d > 0: #gives 2 solution x1 = (-(2*a**2) + sqrt(d)) / 2 x2 = (-(2*a**2) - sqrt(d)) / 2 return x1 and x2 print(inverse_acute_heron(1, 0.5)) print(inverse_acute_heron(1, heron(1, 1, 1)))