# Data Management, Curve and Srf Control

Hey guys,

This is the problem I have been given but I have no clue on how to solve it. Can anyone help me? It would be greatly appreciated.

Problem given: Find the line whose length is the closest to the average

You have given multiple curves I assume, so find the average length of them first. Then compare those curve length with the average length, thus you would be able to find the closest one.

That was actually all the information that we were given

Hi -

I’m afraid that it doesn’t sound like you have tried very much. And I see that Kim completely solved your assignment # 3 for you…

A big part of learning Grasshopper is just looking for the correct components to use.
As @amaraa said, (1) find the length of the curves, (2) find the average of those values, (3) find the length that is most similar to that average, (4) Get the curve from the list that has that length.

If you start with that, post your gh file when you’ve gotten a bit further and get help for where you get stuck.
-wim

Sorry for all that. As a beginner, I was afraid that all I did was wrong. Thanks to your help, I was able to get this far.

Hi Andre -

Nice.
That gives you the index of the item in the list of lengths that is closest to the average length.
You can plug that index into a List item component where this list is hooked up to the original curves. The output of that will be the curve that you are looking for.
-wim