You will write functions for the two edges and the area of a running track. Then you will check the stagger rule and count squares to test an area.
The idea. The inner edge is . The outer edge is longer by . The area is two straight strips plus a ring.
Your tasks.
lap, return the length of the edge of a track with straight sides length and end radius radius, rounded to decimals.track_area, return the area of a track of width width whose inner edge has the end radius radius, rounded to decimals.stagger, return the difference in length between the outer edge and the inner edge, rounded to decimals, using only width.longest_lane to the name of the lane in lanes that has the longest edge. A lane is described by its end radius.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…