A health worker has counted the girls and boys under six in five villages. You will write a function for the sex ratio, find it for every village, list the villages below , and find the ratio of the whole district. The program then draws a bar chart.
The idea. Sex ratio , rounded to a whole number. For the district, add all the girls and all the boys first.
Your tasks.
sex_ratio, return the rounded ratio for girls and boys.ratios with the ratio of every village.low to the list of villages whose ratio is below 950, in alphabetical order.district to the ratio of all the villages together.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…