You are on page 1of 17

Summer Fields School

DLF, Phase-I, Gurugram, Haryana

Subject: Computer Sc.(083) Topic: (Ch: Lists in

Python) Name ……………………..… Class & Sec: XI-…….

Date ………/2022

1. Write Program for the following:


1. Write a program to enter 10 students’ total marks and print marks and average.
2. Write a Python program to remove the characters which have odd index values of a
given List.
3. Write a program in python to check if an element is present in a given list or not.(Linear Search)
4. WAP to increase all elements of a list by 2%.
5. Write a program in python to count and display vowels in a list.
6. Write a program in python to count and display number of words in a list.
7. Write a program in python to find and delete all duplicate elements in list.
8. Write a Python program to calculate the length of a list, without using len().
9. Write a Python program to count the element’s frequency in a list.
10. Write a Python program to Check Whether a List is Palindrome or Not.
11. WAP in python to create a list of natural numbers from 1 to 50 using for loop.
12. WAP in python to take two lists of same size and create a third list of same size with
adding elements at the same location of 1st & 2nd list. E.g. if A=[1,2,3], B= [4,5,6], then
C[5,7,9].

13. WAP in Python to accept any ten numbers from the user in a list and display the maximum
and minimum number along with its position.
14. WAP to split the list into two separate lists, all even numbers in one list and odd in another.
15. Assuming that num is a list of integers, write code display the list. The code should then
replace each element having even value with its half and each element having odd value with its
double, and then display the changed list. Eg: if list has: 3, 4, 5, 16, 9, then the modified list should

have: 6, 2, 10, 8, 18
16. Write a menu driven program which creates an empty list and gives the following options to
the user to perform various operations on a list:
i Append an element to the list
ii Input an element from the user and remove it from the
list iii Remove all elements from the list
iv Count the number of occurrences of an element in the
list v Sort the list
vi Reverse the list
vii Display the list
The program should terminate when the user chooses the option to exit.
17. Write a menu driven program which creates an empty list and gives the following options to
the user to perform various operations on a list:
i Input an element and a location from the user and insert the element at the entered location in
the list.
ii Input a location from the user and remove the element from that location in the
list. iii Input an element from the user and find its location in the list.
iv Display the list in sorted order without sorting the list.
v Display the list in reverse order without reversing the
list. vi Display the list
The program should terminate when the user chooses the option to exit.

You might also like