'Average of list' block not working correctly?

[EDIT w/ cleaner examples]

i am trying to return the average from 4 numbers. using this code
Screen Shot 2020-04-01 at 12.04.02 PM

<>Y values is 4 numbers. 5,2,1,0 as seen here but i get a weird number

I also get this value returned when i divide the sum of list Yvalues by the length of list Yvalues

what’s going on here.
am i doing something wrong?

This is the entire code. I insert a list of y values as is seen in the example above. the rest of the code should produce two data points. a start and end point for a trend line.

when i run the whole code, <>m and <>b return as NaN.

it’s funny but your y-values 5,2,1,0 without the commas is 5210 , which when divided by 4 becomes 1302.5
you may have entered 5,2,1,0 as a text string and it got processed as 5210, maybe it should be built as a list of 4 numbers.
just guessing.

1 Like

I think you’re right.

I hadn’t even considered that.

We’re on a quest rn, but I’ll try to turn text into a list and report back