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
[276, 137, 195, 46, 223, 282, 209, 42, 157, 74, 24, 281, 55, 12, 75, 201, 239, 214, 53, 211] k=11
Answer:
[287, 148, 206, 57, 234, 293, 220, 53, 168, 85, 35, 292, 66, 23, 86, 212, 250, 225, 64, 222]