You will write three small functions about the spinning Earth.
The idea. The Earth turns 15 degrees every hour. Two towns on one line of latitude have times that differ by one hour for each 15 degrees of longitude between them.
Your tasks.
angle_turned, return the angle in degrees that the Earth turns in hours hours.hours_to_turn, return the hours the Earth needs to turn through angle degrees.time_difference, return the difference in hours between two towns that are gap degrees of longitude apart.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…