input: Write a function to find the index of a given value in an array. If the value is not found in the array, return -1. If the array is empty, return -1.
  def find_index(arr, x):
      for i in range(len(arr)):
          if arr[i] == x:
              return i
      return -1
  
  assert find_index([2, 5, 9, 15], 5) == 1
  assert find_index([3, 7, 12, 18], 12) == 2
  assert find_index([1, 4, 6, 8], 3) == -1
  assert find_index([], 10) == -1
output: def find_index(arr, x):
      for i in range(len(arr)):
          if arr[i] == x:
              return i
      return -1