You will write three small functions about the time light takes to cross the Solar System.
The idea. Light travels about 18 million km every minute, or every second. Time = distance ÷ speed.
Your tasks.
light_minutes, return the minutes light takes to go distance million km.light_seconds, return the seconds light takes to go distance million km. One million km is 1000000 km.farthest, the dictionary planets holds names and distances. Return the name of the planet that is farthest away.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…