Question: Python Please Function Name: pair_sum Parameters: list of int, int Returns: list of list of int Description: Implement the function pair_sum that takes as input

Python Please

Python Please Function Name: pair_sum Parameters: list of int, int Returns: list

Function Name: pair_sum Parameters: list of int, int Returns: list of list of int Description: Implement the function pair_sum that takes as input a list of distinct integers Ist and an integer n, and returns the indexes of all pairs of values in Ist that sum up to n. Hint: 1. each integer in Ist will be used only ONCE 2. sort each list entry before returning Sample Inputs/Outputs: Example Call: pair_sum ( [7, 8, 5, 3, 4, 6), 11) Expected Return: [[0, 4],[1,3], [2,5]] 296528.1655254.qx3zqy7 LAB ACTIVITY 13.55.1: Pair Sum(Functions - Medium) 0/11 main.py Load default template... 1 #NOTE: Define the function requested. Do not create/use global variables. 2 3 bo v WN 5 ###DO NOT EDIT BELOW THIS LINE### 6 if __name__ == '__main__': assert pair_sum( [7, 8, 5, 3, 4, 6], 11) == [[0, 4],[1,3], [2,5]] 8

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!