You will write three functions that work with polar coordinates. Angles are in degrees.
The idea. and . Going back, , and math.atan2(y, x) gives the angle in the right quadrant. The distance between two points is .
Your tasks.
to_cartesian(r, deg). Return (x, y).to_polar(x, y). Return (r, deg) with deg .polar_distance(r1, d1, r2, d2). Use the cosine rule.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…