Build tools that meet two lines exactly, find the member of a family through a point, and test three lines for concurrency.
The idea. A line is stored as the triple (A, B, C). Two lines meet at one point unless they are parallel. The line passes through a given point when . Three lines are concurrent when the meeting point of two lies on the third.
Your tasks.
meet, return the meeting point of two lines as a pair of fractions, or None if they are parallel.family_k, return the number for which passes through the point, or None when is at the point.concurrent, return True when the three lines pass through one point, and False otherwise.Have you tried it?
Do the tasks in the editor first, and run the checker after each one. Its hints help when a check fails. When you are ready, compare your code with this solution.
Log in to join the discussion.
Loading…