Are you looking for the median? There are two middle numbers when there is an even number of values.
The median is the middle number of a sorted list of numbers. If the list has an even number of values, the median is calculated as the average of the two middle numbers.
The middle number of a list named "s" with an odd number of values is returned by
I will leave it to you to determine the other condition. Hint: You can use the modulo operator (%) to determine if the list has an even or odd number of values.