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
[253, 65, 204, 258, 103, 280, 137, 52, 281, 23, 285, 212, 186, 22, 230, 128, 248, 147, 20, 172] k=14
Answer:
[267, 79, 218, 272, 117, 294, 151, 66, 295, 37, 299, 226, 200, 36, 244, 142, 262, 161, 34, 186]