Question: Python if the inputs to the function are [2, 3, 4] and 2, the function should return the list [4, 6, 8] a_list = [2,
Python
if the inputs to the function are [2, 3, 4] and 2, the function should return the list [4, 6, 8]
a_list = [2, 4 , 6]
factor_num = input('enter a number ')
def mult_list(a_list,factor_num):
result = factor_num
for x in a_list:
result = result * factor_num
print(mult_list(a_list))
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
