Turtle and Observer Command

median-of-list list

Returns the median of the given list.

Note: If an element in list is not a number, an error occurs.

Note: If list contains no numbers, an error occurs. If some of the list, when evaluated, are not numbers, those values are ignored.

Examples:

median-of-list [ 1 3 5 7 9] returns 5.

Related commands:

median-of-turtles median-of-patches