Question: you will take in two points in the xy-plane from a user: call those points (x1, y1) and (x2, y2). Recall that if a line

you will take in two points in the xy-plane from a user: call those points (x1, y1) and (x2, y2). Recall that if a line is vertical, its equation is of the form x = a for some real number a. Non-vertical lines have the form y = mx + b where m is the slope of the line, and b is the y-intercept. Recall further that (for non-vertical lines), the slope of a line is given by m = y2 − y1 / x2 − x1 . Your program should output the equation of the line through the user’s points, and then output whether it’s horizontal, vertical, increasing, or decreasing

Step by Step Solution

3.44 Rating (157 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

To find the equation of the line through the two points we will use the slopeintercept form y mx b where m is the slope of the line and b is the yinte... View full answer

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!