input: Write a function to implement a linear search algorithm that takes in an array and a value to search for, and returns the index of the value if it is found, or -1 if it is not found.
  def linearSearch(arr, value):
    for i in range(len(arr)):
      if arr[i] == value:
        return i  # value found, return index
    return -1  # value not found
  
  assert linearSearch([5, 3, 7, 2], 7) == 2
  assert linearSearch([6, 7, 8, 9], 1) == -1
  assert linearSearch([], 5) == -1
  assert linearSearch([1, 2, 3], 3) == 2
  assert linearSearch([4, 2, 9, 4], 4) == 0
output: def linearSearch(arr, value):
    for i in range(len(arr)):
      if arr[i] == value:
        return i
    return -1