Question: 1) Write a function called scaler_multiplication (k,li) that takes an integer and a list containing at least one integer as arguments and multiplies each element

 1) Write a function called scaler_multiplication (k,li) that takes an integer

1) Write a function called scaler_multiplication (k,li) that takes an integer and a list containing at least one integer as arguments and multiplies each element in the list by k. For example, if li=[4,2,3,6] and k=4,li should be modified to [16,8,12,24]. Note: Your function should not create or return a new list. Instead, it should modify the list that is passed to it. For example >1i=[7,6,4,3,3] > scalar_multiplication (4,1i) >1i [28,24,16,12,12]

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!