0% found this document useful (0 votes)
27 views1 page

Set B

The document contains 6 Python programming questions that involve using lambda functions, map, reduce, and filter to manipulate lists. The questions involve sorting a list of tuples, finding squares of numbers in a list, converting integers in a list to strings in a tuple, computing the product of numbers from 1 to 25, filtering numbers divisible by 2 and 3, and finding palindromes in a list of strings. Students are asked to write programs for each question in a Jupyter notebook and upload it to GitHub.

Uploaded by

Kratika Varshney
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
27 views1 page

Set B

The document contains 6 Python programming questions that involve using lambda functions, map, reduce, and filter to manipulate lists. The questions involve sorting a list of tuples, finding squares of numbers in a list, converting integers in a list to strings in a tuple, computing the product of numbers from 1 to 25, filtering numbers divisible by 2 and 3, and finding palindromes in a list of strings. Students are asked to write programs for each question in a Jupyter notebook and upload it to GitHub.

Uploaded by

Kratika Varshney
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

Python

Assignment Questions
Assignment
Q1. Create a python program to sort the given list of tuples based on integer value using a lambda
function. 

[('Sachin Tendulkar', 34357), ('Ricky Ponting', 27483), ('Jack Kallis', 25534), ('Virat Kohli', 24936)]

Q2. Write a Python Program to find the squares of all the numbers in the given list of integers using lambda and
map functions.

[1, 2, 3, 4, 5, 6, 7, 8, 9, 10]

Q3. Write a python program to convert the given list of integers into a tuple of strings. Use map and lambda
functions

Given String: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]


Expected output: ('1', '2', '3', '4', '5', '6', '7', '8', '9', '10')

Q4.  Write a python program using reduce function to compute the product of a list containing numbers from 1 to 25.

Q5. Write a python program to filter the numbers in a given list that are divisible by 2 and 3 using the filter function.

[2, 3, 6, 9, 27, 60, 90, 120, 55, 46]

Q6. Write a python program to find palindromes in the given list of strings using lambda and filter function.

['python', 'php', 'aba', 'radar', 'level']

Note: Create your assignment in Jupyter notebook and upload it to GitHub & share that GitHub repository link through
your dashboard.

Data Science Masters Hindi

You might also like