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]]
Write a function main that takes two functions as parameters and the size of the array to be created from these function
-
correctanswer
- Posts: 43759
- Joined: Sat Aug 07, 2021 7:38 am
Write a function main that takes two functions as parameters and the size of the array to be created from these function
Register for solutions, replies, and use board search function. Answer Happy Forum is an archive of questions covering all technical subjects across the Internet.