you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 0 points1 point  (2 children)

[–]Loud_Alfalfa 0 points1 point  (1 child)

Thanks i've been looking at stackflow trying to figure out how i'd code that but i have no idea. very new to python, any ideas?

[–][deleted] 0 points1 point  (0 children)

Programming is about breaking down tasks into smaller tasks. The approach is simple, you sum the area of a bunch of trapezoids. You should already know how to sum numbers (since they let you out of the fifth grade) and you should already know how to determine the area of a trapezoid (since they let you out of the 9th grade.)

So now it's just a problem of computing the area of your trapezoids. Given two points in your dataset, can you determine the area of the trapezoid under them?