spacepaste

  1.  
  2. def adjacentElementsProduct(inputArray):
  3. x = 0
  4. y = 2
  5. lastIndex = len(inputArray) -1
  6. for i in range(lastIndex):
  7. (first, second) = inputArray[x:y:1]
  8. x = x + 1
  9. y = y + 1
  10. productArray = []
  11. productArray.append(first * second)
  12. return max(productArray)
  13.