Intersecting Lines
Start Timer
0:00:00
Say you are given a list of tuples where the first element is the slope of a line and the second element is the y-intercept of a line.
Write a function find_intersecting to find which lines, if any, intersect with any of the others in the given x_range.
Example:
Input:
tuple_list = [(2, 3), (-3, 5), (4, 6), (5, 7)]
x_range = (0, 1)
Output:
def find_intersecting(tuple_list, x_range) -> [(2,3), (-3,5)]
.
.
.
.
.
.
.
.
.
Comments