Solution Exercise 11: multiply the elements of a Python list

Exercise 11

Write an algorithm in python as a function which takes as parameters a tuple (L, n) formed by a list L of numbers and an integer n and which returns the list obtained from L by multiplying its elements by n .
Example if L = [13, 11, 7, 25] and n = 2 the function returns the list: [26, 22, 14, 50]

Solution




 

Younes Derfoufi
CRMEF OUJDA

loader-image
Le prix initial était : € 11,00.Le prix actuel est : € 10,00.
Le prix initial était : € 6,00.Le prix actuel est : € 5,00.



1 thought on “Solution Exercise 11: multiply the elements of a Python list”

Leave a Reply

Your email address will not be published. Required fields are marked *