spacepaste

  1.  
  2. def adjacentElementsProduct(inputArray):
  3. length = len(inputArray) - 1
  4. x = 0
  5. y = 1
  6. product = []
  7. while length >= y:
  8. firstIndex = inputArray[x]
  9. secondIndex = inputArray[y]
  10. product.append(firstIndex*secondIndex)
  11. x = x + 1
  12. y = y + 1
  13. return max(product)
  14.