You will write three small functions about a star that rises 4 minutes earlier each night.
The idea. Times are kept as minutes after midnight, so 21:30 is minutes. Each night the star rises 4 minutes earlier than the night before.
Your tasks.
earlier_by, return how many minutes earlier the star rises after nights nights.rising_time, return the rising time, in minutes after midnight, after nights nights, for a star that rises at start tonight.to_clock, turn minutes after midnight into a clock time such as "20:30".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…