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
3
def multiply(l, n):
return [x * n for x in l]
l, n = [10,11,12,13,15], 3
print(multiply(l, n))
Answered by
6
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
Math,
2 months ago
CBSE BOARD X,
2 months ago
Business Studies,
5 months ago
Math,
5 months ago
Environmental Sciences,
11 months ago
History,
11 months ago