Python List Assignment -1


1. Write a program to input a number and count the occurrence of that number in the given list.
A = [12,34,5,67,78,787,56,43,34,565]
2. Write a program to separate the character and numeric value from a given list and store them in a separate list.
List1 = [1,4,’a’,6,’b’,1,’c’,’d’,12,’e’]
3. What do you mean by sorting?
4. Name any two sorting techniques.
5. Write a program to create a list of 10 integers and sort the list in increasing order using bubble sort method.
6. Suppose total element in a list are 7, so how many times the outer loop will be executed in bubble sort.
7. A = [23,45,21,78,43]
Write the order of the elements in the above list after first pass of bubble sort (in ascending order).

Print Friendly, PDF & Email

Related Posts

If you like CBSEToaday and would like to contribute, you can also write an article using submit article or mail your article to contribute@cbsetoday.com See your article appearing on the cbsetoday.com main page and help other students/teachers.