Question: Examine the function multiply _ list _ by and read the docstring. This function takes each element in a list, multiplies it by a specified

Examine the function multiply_list_by and read the docstring. This function takes each element in a list, multiplies it by a specified multiplier, and puts the results in a new list which is returned. For example, calling multiply_list_by(my_list, 10) should return the list [10,30,50,70,90].
Fill in the missing code in multiply_list_by. Remember that you want to iterate over each element of the argument alist, and append to the new list the value of that element multiplied by multiplier.
Before testing your code for correctness with the Test Code button below, execute %run exercise.py in the IPython interpreter and evaluate multiply_list_by(my_list, 10). If there are errors, use the information from them to debug your code.
Reset

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 Programming Questions!