You will write three small functions about the ellipse of an orbit. Distances are in AU.
The idea. With the semi-major axis and the eccentricity , the nearest distance is and the farthest is . If you know and , then .
Your tasks.
perihelion, return .aphelion, return .eccentricity, return from the nearest and farthest distances.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…