input: Write a python function to calculate the mean and median of a list of numbers.
  assert mean_median([1, 2, 3, 4, 5]) == (3.0, 3)
  assert mean_median([1, 3, 3, 6, 7, 8, 9]) == (5.285714285714286, 6)
  assert mean_median([1, 2, 3, 4, 5, 6]) == (3.5, 3.5)
  assert mean_median([10, 20, 30, 40, 50]) == (30.0, 30)
output: def mean_median(numbers):
      n = len(numbers)
      mean = sum(numbers) / n
      
      sorted_numbers = sorted(numbers)
      if n % 2 == 1:
          median = sorted_numbers[n // 2]
      else:
          median = (sorted_numbers[n // 2 - 1] + sorted_numbers[n // 2]) / 2
      
      return mean, median