sum of neighbors

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
1
2
3
4
5
6

Output
[3, 5, 7, 9, 11]
 
To check your solution you need to sign in
Sign in to continue