Computer Science, asked by youarefuved, 5 months ago

Write a function Multiply(L,n) in Python, which accepts a list L of numbers and n
is a numeric value by which all elements of the list has to be multiplied
Sample Input Data of the list
L= [ 10,11,12,13,15], n=3
Output
L = [30,33,36,39,45]

Answers

Answered by valeriy69
3

\large\mathsf\color{pink}{Solution\: using\: python\: 3}

def multiply(l, n):

return [x * n for x in l]

l, n = [10,11,12,13,15], 3

print(multiply(l, n))

\large\mathsf\color{lightgreen}useful?\: \color{white}\longrightarrow\: \color{orange}brainliest!

Answered by Anonymous
6

\large\mathsf\color{pink}{Solution\: using\: python\: 3}

def multiply(l, n):

return [x * n for x in l]

l, n = [10,11,12,13,15], 3

print(multiply(l, n))

\large\mathsf\color{lightgreen}useful?\: \color{white}\longrightarrow\: \color{orange}brainliest!useful?⟶brainliest!

Similar questions