You will write three functions that solve a triangle, the way a surveyor's calculator does. Angles are in degrees.
The idea. With two sides and the angle between them, the cosine rule gives the third side. With three sides, the cosine rule gives an angle. The area is .
Your tasks.
third_side(a, b, C). Return .angle_opposite(a, b, c). Return the angle opposite the side a, in degrees, from the cosine rule.area(a, b, C). Return .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…