Length of the normal from origin on a straight line whose intercepts are given | Python3 implementation of the approach ; Function to find the normal of the straight line ; Length of the normal ; Driver code
import math ; NEW_LINE def normal ( m , n ) : NEW_LINE INDENT N = ( ( abs ( m ) * abs ( n ) ) / math . sqrt ( ( abs ( m ) * abs ( m ) ) + ( abs ( n ) * abs ( n ) ) ) ) ; NEW_LINE return N ; NEW_LINE DEDENT m = - 5 ; n = 3 ; NEW_LINE print ( normal ( m , n ) ) ; NEW_LINE