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 (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
Get step-by-step solutions from verified subject matter experts
