You will write three small functions about the planets' orbits. Times are in days and distances in AU.
The idea. For a planet that takes days to go round the Sun, with the Earth's year days, the synodic period is . An inner planet at distance has . Any planet comes as close as .
Your tasks.
synodic, return the synodic period for a planet whose year is year days.greatest_elongation, return the greatest elongation in degrees of an inner planet.closest, return the closest distance to the Earth in AU.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…