Sunday, 1 December 2019

LIST OF PYTHON PROGRAMS ON LIST CLASS-11




Programs On Python Lists
Class-11

1.   Write a Python program to get the largest number from a list
2.   Write a Python program to get the smallest number from a list
3.   Write a program to input 10 numbers from the user and then display this list of numbers in reverse order.
4.   Write a program to input 10 numbers from the user and find their sum and average.
5.   Write a program to create a list of 10 random integers in the range 10 to 99, and display this list. Then display all the odd elements of the list.
6.   Write a Python program to remove duplicates from a list.
7.   Write a Python program to check a list is empty or not.
8.   Write a Python program to print a specified list after removing the 0th, 4th and 5th elements.
9.   Write a Python program to find all the values in a list are greater than a specified number.
10. Write a program to create a list names1 to store the names of n1 students of a class. Also create a list names2 to store the names of n2 students of another class. n1, n2, and the names are to be input from the user. Then combine these two lists into a new list and display this new list in the ascending order of names.
11. 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.

No comments:

Post a Comment