Length of remaining two sides of a Triangle from a given side and its adjacent angles | Python3 program for above approach ; Function for computing other 2 side of the trianlgle ; computing angle C ; converting A in to radian ; converting B in to radian ; converting C in to radian ; computing length of side b ; computing length of side c ; driver program ; calling function
import math NEW_LINE def findSide ( a , B , C ) : NEW_LINE INDENT A = 180 - C - B NEW_LINE radA = math . pi * ( A / 180 ) NEW_LINE radB = math . pi * ( B / 180 ) NEW_LINE radC = math . pi * ( C / 180 ) NEW_LINE b = a / math . sin ( radA ) * math . sin ( radB ) NEW_LINE c = a / math . sin ( radA ) * math . sin ( radC ) NEW_LINE return b , c NEW_LINE DEDENT a = 12 NEW_LINE B = 60 NEW_LINE C = 30 NEW_LINE b , c = findSide ( a , B , C ) NEW_LINE print ( b , c ) NEW_LINE