India's weather service publishes the long-period mean of the rain over the whole country, for 1971 to 2020. Here are its four monsoon months, in mm, and the total of the other eight months.
The idea. The season's total is the sum of June to September. Its share is that total divided by the year's total. A season's departure is how far its rain lies above or below the mean, as a percentage of the mean.
Your tasks.
season_total, return the June to September total of the means.share_of_year, return the season's share of the year's rain, in percent.departure, return the departure of a season's rain from the mean, in percent (negative for a dry season).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…