Part 1. Definition
In this task, you are given a list of integers and an integer k. You need to add integer k to each element in the list and return the updated list.
Part 2. Example
[100, 291, 285, 281, 151, 189, 220, 235, 288, 160, 233, 198, 294, 269, 162, 152, 217, 247, 98, 145] k=14
Answer: [114, 305, 299, 295, 165, 203, 234, 249, 302, 174, 247, 212, 308, 283, 176, 166, 231, 261, 112, 159]
Explanation: 14 is added to all the elements of the input list.
Part 3. Exercise
[132, 37, 129, 220, 291, 89, 11, 135, 212, 104, 247, 145, 146, 65, 46, 15, 42, 83, 150, 216] k=11
Answer:
[143, 48, 140, 231, 302, 100, 22, 146, 223, 115, 258, 156, 157, 76, 57, 26, 53, 94, 161, 227]