Question: Please answer in Python. Problem 3 (50 points) Build an Intersection Check program. User inputs two points as x-y coordinates in two- dimension space. Two

Please answer in Python.
Problem 3 (50 points) Build an Intersection Check program. User inputs two points as x-y coordinates in two- dimension space. Two points represent two end points of a line segment. Then, user can input the second two points for the second line segment. Given the two line segments, the program checks whether or not the two line segments intersect. The program displays 1 if the two line segments are crossing. Otherwise, display 0. Please implement your algorithm in Python but do not use any existing modules that find the answer. Hint: use slope and intercept Input: Four x-y coordinates that represent two point for the first line segment and two points for the second line segments Output: 0 or 1 that represents intersection or no intersection Example Input: 7 8 5 12 10 10 3 10 Output: 1 Do you want to test again? Y Input: 5 10 5 2 2 187 Output: 1 Do you want to test again? Y Input: 10 10 3 10 6 3 6 6 Output: 0 Do you want to test again? Y Input: 5 4 8 6 10 6 51 Output: 0 Do you want to test again?N Thank you
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
