You will write short functions for the circumference, the area and the ring. Then you will test the rule for the chord that touches the inner circle.
The idea. The circumference is . The area is . A ring has the area . If a chord of the big circle touches the small circle, the area of the ring is also times the square of half of the chord.
Your tasks.
circumference, return rounded to decimals.area, return rounded to decimals.ring_area, return the area of the ring with outer radius big and inner radius small, rounded to decimals.widest to the name of the ring in rings that has the largest area.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…