You will write functions for the circle inside a triangle: the three tangent lengths, the radius, and a test for a four-sided figure that fits round a circle.
Your tasks.
tangent_lengths, return the tuple (from A, from B, from C) for a triangle with sides a = BC, b = CA and c = AB. Each length is s minus the opposite side, where s is half the perimeter.incircle_radius, return the radius of the incircle: the area divided by s, with the area from Heron's formula.circumscribes, return True when ab + cd equals bc + da. Then set ad to the missing side DA of a figure round a circle with AB = 7, BC = 10 and CD = 12.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…