input: Write a function to locate the index of a value in an array. If the value exists in the array, return its index. Otherwise, return -1. The function should take two inputs: an array `arr` and a value `x`.
  assert find_index([2, 5, 9, 15], 5)==1
  assert find_index([2, 5, 9, 15], 9)==2
  assert find_index([2, 5, 9, 15], 7)==-1
  assert find_index([1, 2, 3], 3)==2
  assert find_index([], 5)==-1
output: def find_index(arr, x):
      try:
          return arr.index(x)
      except ValueError:
          return -1