input: 
  def linearSearch(arr, value):
      """This function performs a linear search on an array to find the index of a given value.
      If the value is found, it returns the index; otherwise, it returns -1.
      >>> linearSearch([5, 3, 7, 2], 7)
      2
      >>> linearSearch([5, 3, 7, 2], 4)
      -1
      """
      for i in range(len(arr)):
          if arr[i] == value:
              return i  # value found, return index
      return -1  # value not found
  
output:     for i in range(len(arr)):
          if arr[i] == value:
              return i  # value found, return index
      return -1  # value not found