Having 6 integers in the input, your task is to create a new list out of those, where each element would be the sum of neighbors in the input.
The program should print the resulting list in the output.
Input | Output |
1
2
3
4
5
6 | [3, 5, 7, 9, 11] |
Profound Academy