Calculate angle of triangle Python
It's a little more compicated than that. You need to use the law of cosines
>>> A = 7
>>> B = 7
>>> C = 9.899
>>> from math import acos, degrees
>>> degrees(acos((A * A + B * B - C * C)/(2.0 * A * B)))
89.99594878743945
This is accurate to 4 significant figures. If you provide a more precise value of C, you get a more accurate result.
>>> C=9.899494936611665
>>> degrees(acos((A * A + B * B - C * C)/(2.0 * A * B)))
90.0