Question: Write a program that calculates the slope between two coordinates: (x1,y1) and (x2, y2). The program should take four decimal inputs from the user,

Write a program that calculates the slope between two coordinates: (x1,y1) and 


Write a program that calculates the slope between two coordinates: (x1,y1) and (x2, y2). The program should take four decimal inputs from the user, in the order of x1, x2, y1, y2. Then print the slope. Note: slope formula looks like this: rise y2-y Slope = m run - Hint: Just find 4 points and plug in the formula. Sample run: Enter the first x-coordinate: 3.9 Enter the second x-coordinate: 5.1 Enter the first y-coordinate: 4.8 Enter the second y-coordinate: 1.2 Slope: -3.0000000000000004

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 Programming Questions!