Radius of the inscribed circle within three tangent circles | Python3 implementation of the approach ; Taking r1 , r2 , r3 as input ; Calculation of r4 using formula given above
from math import sqrt NEW_LINE r1 = 1 NEW_LINE r2 = 2 NEW_LINE r3 = 3 NEW_LINE r4 = ( r1 * r2 * r3 ) / ( r1 * r2 + r2 * r3 + r1 * r3 + 2.0 * sqrt ( r1 * r2 * r3 * ( r1 + r2 + r3 ) ) ) NEW_LINE print ( round ( r4 , 6 ) ) NEW_LINE