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 0 for both mean and median.
  def mean_median(arr): 
      if not arr:
          return 0, 0
        
      arr_sum = 0 
      for i in range(len(arr)): 
          arr_sum += arr[i] 
        
      mean = arr_sum / len(arr) 
      
      arr = sorted(arr) 
      if len(arr) % 2 != 0: 
          median = arr[len(arr) // 2] 
      else: 
          median = (arr[len(arr) // 2] + arr[len(arr) // 2 - 1]) / 2
        
      return mean, median
  
  assert mean_median([10, 15, 20, 25, 30, 35]) == (22.5, 22.5)
  assert mean_median([4, 8, 10, 12, 5]) == (7.8, 8)
  assert mean_median([7]) == (7, 7)
  assert mean_median([]) == (0, 0)
  assert mean_median([1, 2, 3]) == (2.0, 2)
output: def mean_median(arr): 
      if not arr:
          return 0, 0
        
      arr_sum = 0 
      for i in range(len(arr)): 
          arr_sum += arr[i] 
        
      mean = arr_sum / len(arr) 
      
      arr = sorted(arr) 
      if len(arr) % 2 != 0: 
          median = arr[len(arr) // 2] 
      else: 
          median = (arr[len(arr) // 2] + arr[len(arr) // 2 - 1]) / 2
        
      return mean, median