Page 1 of 1

Write a function main that takes two functions as parameters and the size of the array to be created from these function

Posted: Fri Jun 10, 2022 4:15 pm
by correctanswer
Write A Function Main That Takes Two Functions As Parameters And The Size Of The Array To Be Created From These Function 1
Write A Function Main That Takes Two Functions As Parameters And The Size Of The Array To Be Created From These Function 1 (62.28 KiB) Viewed 22 times
Python
Write a function main that takes two functions as parameters and the size of the array to be created from these functions as the third parameter of tuple type. The function should perform elementwise addition of the two arrays and return the resulting array. For example: Test Result print (main (lambda x, y: x+y, lambda x, y: x+y, (3, 3))) [[0 2 4] [2 4 6] [4 6 8]]