input: Write a function to read an array from the user and then determine the mean and median of the array. If the array is empty, return None for both the mean and median.
  assert mean_median([10, 15, 20, 25, 30, 35])==(22.5, 22.5)
  assert mean_median([5, 3, 1, 2, 4])==(3.0, 3)
  assert mean_median([1, 1, 1, 1, 1])==(1.0, 1)
  assert mean_median([100, 150, 50])==(100.0, 100)
  assert mean_median([])==(None, None)
output: def mean_median(arr):
      if not arr:
          return None, None
      arr.sort()
      n = len(arr)
      mean = sum(arr) / n
      if n % 2 == 0:
          median = (arr[n//2 - 1] + arr[n//2]) / 2
      else:
          median = arr[n//2]
      return mean, median