The pulse rates of 24 students, in beats a minute, all lie between 60 and 100. You will cut that range into equal groups, count the pulses in each group, and see what happens with too many groups. Then the program draws the data with 2, 5 and 20 bars.
The idea. For groups from 60 to 100, each group is wide. A group runs from its left edge up to, but not including, its right edge.
Your tasks.
edges, return the k + 1 edges of the groups, from 60 to 100.counts, return how many pulses fall in each group.empty_20 to the number of groups that hold no pulse when there are 20 groups.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…