Sine Rule with Derivation , Example and Implementation | Python3 program for the above approach ; Function to calculate remaining two sides ; Calculate angle B ; Convert angles to their respective radians for using trigonometric functions ; Sine rule ; Print the answer ; Input ; Function Call
import math NEW_LINE def findSides ( A , C , c ) : NEW_LINE INDENT B = 180 - ( A + C ) NEW_LINE A = A * ( 3.14159 / 180 ) NEW_LINE C = C * ( 3.14159 / 180 ) NEW_LINE B = B * ( 3.14159 / 180 ) NEW_LINE a = ( c / math . sin ( C ) ) * math . sin ( A ) NEW_LINE b = ( c / math . sin ( C ) ) * math . sin ( B ) NEW_LINE print ( " { 0 : . 2f } " . format ( a ) ) NEW_LINE print ( " { 0 : . 2f } " . format ( b ) ) NEW_LINE DEDENT A = 45.0 NEW_LINE C = 35.0 NEW_LINE c = 23 NEW_LINE findSides ( A , C , c ) NEW_LINE