input: Write a function to perform a linear search in an array and return the index of the value if found, or -1 if not found. The function should accept an array and a value to search for as arguments.
  assert linearSearch([5, 3, 7, 2], 7) == 2
  assert linearSearch([5, 3, 7, 2], 4) == -1
  assert linearSearch([], 1) == -1
  assert linearSearch([1, 2, 3], 3) == 2
  assert linearSearch([2, 2, 2, 2], 2) == 0
output: def linearSearch(arr, value):
      for i in range(len(arr)):
          if arr[i] == value:
              return i
      return -1