Question: Write a function in Python name it funcnA. given testList = [1, -4, 8, -9] as an argument it will return result_list = [5, -20,

 

Write a function in Python name it funcnA.

given

testList = [1, -4, 8, -9] as an argument it will return

result_list = [5, -20, 40, -45]

your code should use a function call with the argument and then print the returned value.

Write another function name it compare_2Lists which takes two parameters: testList and, result_list = [5, -20, 40, -45]

This function should return True if what was returned from funcnA matched result_list.

Call the function compare_2Lists with testList and result_list.

Print the returned values of either True or False.

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!