Question: vals _ to _ update and modifier _ num are read from input. multiply _ nums ( ) has two parameters list _ to _

vals_to_update and modifier_num are read from input. multiply_nums() has two parameters list_to_modify and num, and multiplies each element of list_to_modify by num. Call multiply_nums() with a copy of the list vals_to_update and modifier_num as the arguments to avoid modifying vals_to_update.
Click here for example def multiply_nums(list_to_modify, num):
for i, element in enumerate(list_to_modify):
list_to_modify[i]= element * num
print(f'Modified list: {list_to_modify}')
vals_to_update =[int(x) for x in input().split()]
modifier_num = int(input())
''' Your code goes here '''
print(f'Original list: {vals_to_update}')

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!