Forty students named their favourite subject. You will find the total, the angle of each pie slice and the order of the bars. Then the program draws the bar chart and the pie chart side by side.
The idea. A slice's angle is . Bars are easiest to read from the tallest to the shortest.
Your tasks.
total to the sum of counts.angles to the list of slice angles, one for each count.order to the subjects sorted from the largest count to the smallest.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…