Find interior angles for each side of a given Cyclic Quadrilateral | Python3 program for the above approach ; Function to find the interior angles of the cyclic quadrilateral ; Stores the numerator and the denominator to find angle A ; Stores the numerator and the denominator to find angle B ; Stores the numerator and the denominator to find angle C : ; Stores the numerator and the denominator to find angle D : ; Driver Code
import math NEW_LINE def findAngles ( a , b , c , d ) : NEW_LINE INDENT numerator = a * a + d * d - b * b - c * c NEW_LINE denominator = 2 * ( a * b + c * d ) NEW_LINE x = numerator / denominator NEW_LINE print ( " A : ▁ " , ' % .2f ' % ( ( math . acos ( x ) * 180 ) / 3.141592 ) , " ▁ degrees " ) NEW_LINE numerator = a * a + b * b - c * c - d * d NEW_LINE x = numerator / denominator NEW_LINE print ( " B : ▁ " , ' % .2f ' % ( ( math . acos ( x ) * 180 ) / 3.141592 ) , " ▁ degrees " ) NEW_LINE numerator = c * c + b * b - a * a - d * d NEW_LINE x = numerator / denominator NEW_LINE print ( " C : ▁ " , ' % .2f ' % ( ( math . acos ( x ) * 180 ) / 3.141592 ) , " ▁ degrees " ) NEW_LINE numerator = d * d + c * c - a * a - b * b NEW_LINE x = numerator / denominator NEW_LINE print ( " D : ▁ " , ' % .2f ' % ( ( math . acos ( x ) * 180 ) / 3.141592 ) , " ▁ degrees " ) NEW_LINE DEDENT if __name__ == " _ _ main _ _ " : NEW_LINE INDENT A = 10 NEW_LINE B = 15 NEW_LINE C = 20 NEW_LINE D = 25 NEW_LINE findAngles ( A , B , C , D ) NEW_LINE DEDENT