Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def adjacentElementsProduct(inputArray):
- x = 0
- y = 2
- lastIndex = len(inputArray) -1
- for i in range(lastIndex):
- (first, second) = inputArray[x:y:1]
- x = x + 1
- y = y + 1
- productArray = []
- productArray.append(first * second)
- return max(productArray)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement