You will remove each point of a data set in turn, work out without it, and find the point whose removal changes the most. The checker uses the heights and arm spans of the lesson, with the typing mistake.
The idea. A point with a large pull on changes a lot when it is left out. Comparing with and without each point is a simple way to find such a point.
Your tasks.
without(values, i). Return a new list with item i left out.change_in_r(xs, ys, i). Return the size of the change in when point i is left out.most_important(xs, ys). Return the index of the point with the largest change.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…