Question: I need help on this question. I have gotten far to making the class Line as an object and defining the slope function, but I
I need help on this question. I have gotten far to making the class Line as an object and defining the slope function, but I am not sure about the rest of the information. Please explain this thoroughly so I may learn from this.
A line goes through two points P and Q with coordinates P-(Px, Py) and Q-(Qx, Qy). Create a Python class Line. This class takes values as arguments in form of points with x, y coordinates: Px, Py, Qx, Qy. In addition, create the following methods: Slope, which returns the slope of the line. y intercept, the (x,y) coordinates of the point at which the line intersects the y-coordinate. AreParallel, which check whether two lines (of type Line) are parallel and returns either True or False. MinimalDistance, which returns the smallest distance between the line and the origin
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
