Question: in python: Create a Line class using the class skeleton below. Fill in the code needed for each function. (Hint: coor1, coor2 are tuples) class
in python:
Create a Line class using the class skeleton below. Fill in the code needed for each function. (Hint: coor1, coor2 are tuples) class Line: def __init__(self, coor1, coor2): pass def distance(self): pass def slope(self): pass
Sample output: coordinate1 = (3,2) coordinate2 = (8,10) li = Line(coordinate1, coordinate2) print(li.distance()) 9.433981132056603 print(li.slope()) 1.6
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
