You will write three functions about zone time. Times are in hours after midnight, and offsets are in hours.
The idea. Zone time is Universal Time plus the offset. To change from one zone to another, take away the first offset and add the second. A town west of the zone's central meridian has its noon later by minutes for each degree.
Your tasks.
to_zone, return the time in a zone with a given offset when it is ut hours Universal Time. Keep the answer from up to .convert, return the time in the second zone when it is time hours in the first zone.noon_clock, return the clock time of local mean noon, in hours, for a town at longitude degrees east in a zone whose central meridian is zone_meridian degrees east.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…