Question: b) The second function takes two lists and an integer n as parameter and appends the second list to the first list producing a list
b) The second function takes two lists and an integer n as parameter and appends the second list to the first list producing a list which is n elements long. o If the total number of elements of the first list and the second list equals n, append them completely. Result 1,4,5,3,6] # 5 elements o If the total number of elements of the first list and the second list is less than n, append them fully and return the resulting list appended with 0's, totaling n elements f2 ([1,4,51,13,6],7); Result [1,4,5,3,6,0,0] #7elements o If the total number of elements of the first list and the second list is greater than n, take only the first n elements of the resulting list. f2 ([1,8],12,5,6],3); Result [1,8,] #3 elements Note: You can use list functions,but no loops J
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
