You will measure how a point cuts a side of a triangle, then use the two ratios to decide whether a line is parallel to the base.
Your tasks.
dist, return the distance between the points p and q.split_ratio, return the ratio for a point d on the segment from a to b.is_parallel_by_ratio, return True when d on AB and e on AC cut the two sides in the same ratio, .ratio_found to the ratio for , and .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…