Advertisement
Guest User

Untitled

a guest
Dec 15th, 2018
124
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.31 KB | None | 0 0
  1. def adjacentElementsProduct(inputArray):
  2.     x = 0
  3.     y = 2
  4.     lastIndex = len(inputArray) -1
  5.  
  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)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement