Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

how to find exact distance

import math

x1 = int(input("what is x1: "))
y1 = int(input("what is y1: "))
x2 = int(input("what is x2: "))
y2 = int(input("what is y2: "))

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

eqn = eq**2
print("the answer is the square root of",eqn ,"which is", eq)
 
PREVIOUS NEXT
Tagged: #find #exact #distance
ADD COMMENT
Topic
Name
5+1 =