Computer Science, asked by abhayajayan1, 4 months ago

write down the python program to find the distance between two points ​

Answers

Answered by Anonymous
3

Answer:

hello, here i have used the distance formula ....

Explanation:

#python program to find the distance between two points ​

x1=eval(input("enter the value of x1"))

x2=eval(input("enter the value of x2"))

y1=eval(input("enter the value of y1"))

y2=eval(input("enter the value of y2"))

d=((((x2-x1)**2)+((y2-y1)**2))**(1/2))

print("using distance formula the distance between two points is:",d)

hope it helps you

please mark brainliest

@ItzSnowySecret07

Answered by ғɪɴɴвαłσℜ
3

\sf{\huge{\underline{\green{Answer :-}}}}

\setlength{\unitlength}{1cm}\begin{picture}(6,5)\linethickness{.4mm}\put(1,1){\line(1,0){4.5}}\put(1,1){\line(0,1){3.5}}\qbezier(1,4.5)(1,4.5)(5.5,1)\put(.3,2.5){\large\bf y2- y1}\put(2.8,.3){\large\bf x2-x1}\put(1.02,1.02){\framebox(0.3,0.3)}\put(.7,4.8){\large\bf (x2,y2)}\put(.8,.3){\large\bf B}\put(5.8,.3){\large\bf (x1,y1)}\qbezier(4.5,1)(4.3,1.25)(4.6,1.7)\put(3.8,1.3){\large\bf $\Theta$}\end{picture}

The distance between two points is :-

 \sqrt{(x2 - x1) {}^{2} + (y2 - y1) {}^{2}  }

\sf{\large{\boxed{\pink{Programme :-}}}}

# python 3

# To find the distance between two points.

important math,

//"*points

x1=int(input("enter x1 : "))

x2=int(input("enter x2 : "))

y1=int(input("enter y1 : "))

y2=int(input("enter y2 : "))

result= ((((x2 - x1 )^2) + ((y2-y1)^2) )^0.5)

print("distance between",(x1,x2),"and",(y1,y2),"is : ",result)

______________________________________

Similar questions