input: Write a function to read an array of numbers from the user and then calculate the mean and median of the array. The function should return the mean and median as a tuple. If the array is empty, the function should return None.
  assert mean_median([10, 15, 20, 25, 30, 35])==(22.5, 22.5)
  assert mean_median([1, 2, 3, 4, 5, 6, 7, 8])==(4.5, 4.5)
  assert mean_median([1, 3, 3, 6, 7, 8, 9])==(5.285714285714286, 6)
  assert mean_median([])==None
output: def mean_median(arr):
      if not arr:
          return None
      arr.sort()
      mean = sum(arr) / len(arr)
      n = len(arr)
      if n % 2 == 0:
          median = (arr[n//2 - 1] + arr[n//2]) / 2
      else:
          median = arr[n//2]
      return (mean, median)