You will use the discriminant to count the points where a line meets a circle, and the distance between the centres to count the points where two circles meet.
Your tasks.
common_points, return the number of common points of the line and the circle , using the discriminant.tangent_k to the positive value of for which touches the circle .circles_meet, return , or : the number of common points of two circles with radii r1 and r2 whose centres are d apart.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…