You will write three small functions that turn the mass and the radius of a world into its density, its gravity and its escape speed. Masses are in kg and radii in km.
The idea. The density is , the gravity is and the escape speed is , with and in metres.
Your tasks.
density, return the density in .surface_gravity, return in .escape_speed, return the escape speed in km/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…