Program to calculate distance between two points | Python3 program to calculate distance between two points ; Function to calculate distance ; Calculating distance ; Drivers Code
import math NEW_LINE def distance ( x1 , y1 , x2 , y2 ) : NEW_LINE INDENT return math . sqrt ( math . pow ( x2 - x1 , 2 ) + math . pow ( y2 - y1 , 2 ) * 1.0 ) NEW_LINE DEDENT print ( " % .6f " % distance ( 3 , 4 , 4 , 3 ) ) NEW_LINE