You will write three ways of adding rectangles under a curve: with the right-hand corners, the left-hand corners and the middles of the strips. The checker compares them with known values.
The idea. Cut into strips of width . The right-hand sum uses the heights . The left-hand sum uses . The middle sum uses for . Each is multiplied by .
Your tasks.
right_sum(f, a, b, n).left_sum(f, a, b, n).middle_sum(f, a, b, n).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…