Question: 2.3 Question 3 Write a Python function: def biggestWithPos(A) which takes an array of integers and returns the biggest integer in the array along with

 2.3 Question 3 Write a Python function: def biggestWithPos(A) which takes

2.3 Question 3 Write a Python function: def biggestWithPos(A) which takes an array of integers and returns the biggest integer in the array along with its position, as a pair. For example, if it takes the array [5 , 12 ,31 ,7 , 25] as input it will return the pair (31 , 2). If A is empty, the function should return None (which corresponds to the null value in Python). Note: The specication does not mention which position to return in case the biggest element occurs in more than one positions, so the function can return any of those positions. I: # some tests, but you can add your own ones as well tests = {[5,12,31,7,25],[-5,12,-31,7,25],[-5,-12,-31,-7,-25],[12,13],,[-5]) for A in tests: print(biggestithPos(A))

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