You will write three functions that astronomers use to find and measure planets. Masses are in solar masses, distances in AU, times in years.
The idea. Kepler's third law in these units is . A transit of depth gives . A planet of mass at speed moves its star at .
Your tasks.
total_mass, return the total mass of two bodies with separation a and period T.planet_radius, return the planet's radius, in the same unit as R_star, for a transit of depth depth (a fraction).star_speed, return the star's wobble speed in m/s.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…