spacepaste

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