Search⌘ K
AI Features

Challenge: Read the Line Segments

Explore how to filter points and line segments based on their locations in Cartesian coordinate quadrants. Learn to apply tuple handling and data structure techniques in Python to identify points in specific quadrants, including custom rules for axis points. This lesson enhances your ability to work with geometric data and structured tuples effectively.

Problem 1

You are given a list of points represented as tuples (x, y).
Your task is to filter out and return only those points that lie in the 2nd quadrant. Diagram to understand quadrants better is attached below.

Example input:

points = [(2, 3), (-1, 5), (-3, -2), (-4, 0)]

Expected output:

 ...