import math
P1=[]
P2=[]
X1=int(input("Enter the x co-ordinate of starting point:"))
Y1=int(input("Enter the y co-ordinate of starting point:"))
X2=int(input("Enter the x co-ordinate of ending point:"))
Y2=int(input("Enter the co-ordinate of ending point:"))
P1.append(X1)
P2.append(X2)
P1.append(X2)
P2.append(Y2)
distance = math.sqrt( ( (P1[ 0]-P2[0] )** 2)+((P1[1]-P2[1])** 2) )
print(" distance=%f"%distance)
To embed this project on your website, copy the following code and paste it into your website's HTML: