为给定的一组数字计算中位数。
一个数字列表。
To calculate the median of a given set of numbers:

1. Sort the numbers in ascending order.
2. If the list has an odd number of elements, the median is the middle element.
3. If the list has an even number of elements, the median is the average of the two middle elements.