Question
Write in python a program that finds the distance between two coordinates (x1,y1) and (x2,y2). To find the distance we just use the classic Euclidian
Write in python a program that finds the distance between two coordinates (x1,y1) and (x2,y2). To find the distance we just use the classic Euclidian distance: https://en.wikipedia.org/wiki/Euclidean_distance The program should read in two coordinates (one element at a time) and then print out the distance between the coordinates. Sample example: Point 1, x coordinate: 1 Point 1, y coordinate: 1 Point 2, x coordinate: 5 Point 2, y coordinate: 5 The distance between (1.0, 1.0) and (5.0, 5.0) is 5.656854249492381 Point 1, x coordinate: 0 Point 1, y coordinate: 4 Point 2, x coordinate: 3 Point 2, y coordinate: 0 The distance between (0.0, 4.0) and (3.0, 0.0) is 5.0 Point 1, x coordinate: 10 Point 1, y coordinate: 10 Point 2, x coordinate: 10 Point 2, y coordinate: 10 The distance between (10.0, 10.0) and (10.0, 10.0) is 0.0 Point 1, x coordinate: 1 Point 1, y coordinate: 2 Point 2, x coordinate: 3 Point 2, y coordinate: 4 The distance between (1.0, 2.0) and (3.0, 4.0) is 2.8284271247461903 Point 1, x coordinate: 1 Point 1, y coordinate: 1 Point 2, x coordinate: -1 Point 2, y coordinate: -1 The distance between (1.0, 1.0) and (-1.0, -1.0) is 2.8284271247461903
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started