Question: Write a function call it slope_distance (its name) that accepts the coordinates of 2 points, and returns the slope of the line connecting the 2

Write a function call it "slope_distance" (its name) that accepts the coordinates of 2 points,

and returns the slope of the line connecting the 2 points, also returns the distance between the 2 points.

call this function from the main function, and let the program prints the returned values from the function "slope_distance" in the main.

slope=(y2-y1)/(x2-x1)

distance=sqrt(x2-x1)*(x2-x1)+(y2-y10*(y2-y1))

p1(x1,y1) first point

p2(x2,y2) second point

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!