Assign point_dist with the distance between point (x1, y1) and point (x2, y2). the calculation is: distance = squarerootof( (x2
- x1)2 + (y2 - y1)2 ). sample output for the given program:
1 answer:
<span>import math
def calculateDistance(x1,y1,x2,y2):
dist = math.sqrt((x2 - x1)**2 + (y2 - y1)**2)
return dist
distance = calculateDistance(2,4,6,8)
print distance</span>
You might be interested in
Answer:
15
Step-by-step explanation:
Answer:
infinite
Step-by-step explanation:
Answer:
This is the answer of your question.
Midpoint formula gives (3,1)