To write a python program to find the distance two two points
- Import math module
- Create the list from the given points and formula
- Use the formula d=√((x_2-x_1)²+(y_2-y_1)²) to find the distane between two points
- Use math.sqrt for the square root and calculate the distance between the given points
- Print the calculates distance for 2 decimals
#Program to find the distance between two points.
#Developed by: Meetha Prabhu
#RegisterNumber:212222240065
import math
d1=[4,2]
d2=[10,6]
d=math.sqrt((d2[0]-d1[0])**2+(d2[1]-d1[1])**2)
print("{:.2f}".format(d))
Thus the program to find the distance between two points is written and verified using python programming.