You will write functions that measure the sides of a triangle given by its corners, compare two triangles, and build a triangle from two sides and the angle between them.
The idea. Two triangles with the same three side lengths are congruent (SSS). A triangle built from two sides and the angle between them (SAS) is fixed, so two such triangles with equal numbers are congruent.
Your tasks.
side_lengths, return the three side lengths of the triangle, rounded to decimals and sorted from smallest to largest.congruent, return True when two triangles have the same sorted side lengths.sas_triangle, return the corners , and so that and the angle at is angle degrees.same to the names in options whose triangle is congruent to sas_triangle(5, 4, 60).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…