You will write three small solvers. Angles are in degrees and sides in cm.
The idea. The cosine rule gives the third side from two sides and the angle between them, and an angle from three sides. For two sides , and an angle not between them, there are , or triangles.
Your tasks.
third_side(b, c, A). Return from .angle_A(a, b, c). Return angle in degrees.count_ssa(a, b, A). Return the number of triangles. Use : none if ; one if or ; two if . Assume is acute.Run your code once to unlock the worked solution.
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…