Computer Science, asked by priyanshrikhari728, 6 months ago

Write a function LShift(Arr) in Python, which accepts a list Arr of numbers and replaces each even

value with two times of its value​

Answers

Answered by valeriy69
0

nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]

def LShift(Arr):

for i, v in enumerate(Arr):

if v % 2 == 0:

nums[i] = 2 * v

return Arr

print(LShift(nums))

\small\mathsf\color{lightgreen}useful?\: \color{white}\mapsto\: \color{orange}brainliest

Similar questions