Skip to content

Latest commit

 

History

History
24 lines (16 loc) · 638 Bytes

File metadata and controls

24 lines (16 loc) · 638 Bytes

Python Programming Basics - Assignment

Problem Statement:

Write a function to find pair sum in a list.

  1. Define function 'pairSum' which will accept two arguments, a integer list and a number.
  2. List should have at least two elements in it.
  3. Function should return pair of integers within list having sum equal to given number as argument.
  4. Function should pass all test cases.

Instructions:

  • Program should be written in file pair_sum.py

  • Function name should be pairSum.

  • Input

     Type:  List
     Value: ([1,2,3,4], 5)
    
  • Expected Output

      Type:  List
      Value: [(1,4), (2,3)]