input: Write a function to read an array from the user, compute the mean and median of the array, and return them as a tuple. If the array is empty, return (None, None).
  assert mean_median([10, 15, 20, 25, 30, 35]) == (22.5, 22.5)
  assert mean_median([1, 2, 3, 4, 5]) == (3.0, 3)
  assert mean_median([0, 0, 0, 0, 0]) == (0.0, 0)
  assert mean_median([]) == (None, None)
  assert mean_median([1]) == (1.0, 1)
output: def mean_median(arr):
      if not arr:
          return (None, None)
      mean_val = sum(arr) / len(arr)
      sorted_arr = sorted(arr)
      n = len(sorted_arr)
      if n % 2 == 0:
          median_val = (sorted_arr[n//2 - 1] + sorted_arr[n//2]) / 2
      else:
          median_val = sorted_arr[n//2]
      return (mean_val, median_val)