You will write functions that link the radius of a circle, the length of a chord and its distance from the centre. Then you will find the angle a chord makes at the centre.
The idea. The perpendicular from the centre bisects the chord, so . The angle at the centre follows from the right triangle: half of it has the sine .
Your tasks.
chord_length, return the length of the chord at distance distance from the centre, rounded to decimals.distance_to_chord, return the distance from the centre of a chord of length chord, rounded to decimals.centre_angle, return the angle in degrees that the chord makes at the centre, rounded to decimals.longest to the name of the chord in distances that is the longest.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…