P2 SET2 Question PP 2022-23
P2 SET2 Question PP 2022-23
P2 SET2 Question PP 2022-23
SET 2
Q No Question Marks
a) Write a Python program to count the positive, negative and zero numbers from a
list.
b) Write a Python program to find all three and/or four character words which end
with vowels in a string.
a) Write a Python program that takes two tuples test_tuple1 and test_tuple2 and
returns a list of all pair combinations of the two tuples.
K. J. Somaiya College of Engineering, Mumbai-77
(A Constituent College of Somaiya Vidyavihar University)
b) Write a Python program that takes two lists, lst_1 and lst_2 as input and performs
the following using lambda and filter functions:
i) Intersection of the two lists
ii) lst_1 - lst_2 (Elements present in lst_1 but not in lst_2 without any
duplicates)
iii) lst_2 - lst_1 (Elements present in lst_2 but not in lst_1 without any
duplicates)
iv) Union of the two lists
Output: Output:
i) [13,32] i) []
ii) [1,6,7,10] ii) [1,6,7,10]
iii) [17,18] iii) [13,17,18,32]
iv) [1,6,7,10,13,32,17,18] iv) [1,6,7,10,13,17,18,32]