def mean(numbers): numbers.sort() q = len(numbers) // 2 if len(numbers) % 2 !=0: return numbers[q] elif len(V) % 2 == 0: return (numbers[q - 1] + numbers[q]) / 2