Check if a circle lies inside another circle or not | Python3 program to check if one circle lies inside another circle or not . ; Driver code
def circle ( x1 , y1 , x2 , y2 , r1 , r2 ) : NEW_LINE INDENT distSq = ( ( ( x1 - x2 ) * ( x1 - x2 ) ) + ( ( y1 - y2 ) * ( y1 - y2 ) ) ) ** ( .5 ) NEW_LINE if ( distSq + r2 == r1 ) : NEW_LINE INDENT print ( " The ▁ smaller ▁ circle ▁ lies ▁ completely " " ▁ inside ▁ the ▁ bigger ▁ circle ▁ with ▁ " " touching ▁ each ▁ other ▁ " " at ▁ a ▁ point ▁ of ▁ circumference . ▁ " ) NEW_LINE DEDENT elif ( distSq + r2 < r1 ) : NEW_LINE INDENT print ( " The ▁ smaller ▁ circle ▁ lies ▁ completely " " ▁ inside ▁ the ▁ bigger ▁ circle ▁ without " " ▁ touching ▁ each ▁ other ▁ " " at ▁ a ▁ point ▁ of ▁ circumference . ▁ " ) NEW_LINE DEDENT else : NEW_LINE INDENT print ( " The ▁ smaller ▁ does ▁ not ▁ lies ▁ inside " " ▁ the ▁ bigger ▁ circle ▁ completely . " ) NEW_LINE DEDENT DEDENT x1 , y1 = 10 , 8 NEW_LINE x2 , y2 = 1 , 2 NEW_LINE r1 , r2 = 30 , 10 NEW_LINE circle ( x1 , y1 , x2 , y2 , r1 , r2 ) NEW_LINE