Question: Task 2 Write a function ( select that takes a 2 D array as a parameter and prints out two sorted lists: the list of

Task 2
Write a function (select that takes a 2D array as a parameter and prints out two sorted lists: the list of squares of negative elements found in the array and the list of cubes of non-negative elements found there. (Compare wo, Tasks 8,9 and 10)
Example usage:
select ([[-2,5],[-4,6],[2,311)
output:
[4,16]
[8,27,125,216]

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 Programming Questions!