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

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