Answered step by step
Verified Expert Solution
Question
1 Approved Answer
A Cartesian Grid has a series of lines drawn on it . Each line is defined by a list of 4 values x 1 ,
A Cartesian Grid has a series of lines drawn on it Each line is defined by a list of values where
the points and are the end points of the line. The lines may or may not form a closed figure.
Write a Python program to read in the number of lines, followed by a series of lines in no particular order. Given
that some of these lines may not contribute to a closed figure, determine whether or not a subset of the given
lines would form a closed figure. If they form a closed figure, also print the number of sides.
For this program, you must use only the standard Python libraries. Thirdparty libraries are not allowed. The
following figure illustrates the problem.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started