Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

exact distance math

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: #exact #distance #math
ADD COMMENT
Topic
Name
2+2 =