Length of the transverse common tangent between the two non intersecting circles | python 3 program to find the length of the transverse common tangent between two circles which do not touch each other ; Function to find the length of the transverse common tangent ; Driver code
from math import sqrt , pow NEW_LINE def lengthOfTangent ( r1 , r2 , d ) : NEW_LINE INDENT print ( " The ▁ length ▁ of ▁ the ▁ transverse " , " common ▁ tangent ▁ is " , ' { 0 : . 6g } ' . format ( sqrt ( pow ( d , 2 ) - pow ( ( r1 + r2 ) , 2 ) ) ) ) NEW_LINE DEDENT if __name__ == ' _ _ main _ _ ' : NEW_LINE INDENT r1 = 4 NEW_LINE r2 = 6 NEW_LINE d = 12 NEW_LINE lengthOfTangent ( r1 , r2 , d ) NEW_LINE DEDENT