input: Write a function to perform a linear search on an array. The function should take an array and a value to search for. If the value is found in the array, the function should return its index. If the value is not found, the function should return -1.
  assert linearSearch([5, 3, 7, 2], 7)==2
  assert linearSearch([5, 3, 7, 2], 8)==-1
  assert linearSearch([], 7)==-1
  assert linearSearch([1, 2, 3, 4], 4)==3
  assert linearSearch([9, 8, 7, 6], 9)==0
output: def linearSearch(arr, value):
      for i in range(len(arr)):
          if arr[i] == value:
              return i
      return -1