Class 11 Python Question Bank (Strings & Lists)
A. String-based Questions
1. Write a program to input a string and display it in reverse order.
2. Write a program to check whether a string is a palindrome.
3. Write a program to count the number of vowels in a string.
4. Write a program to count the number of consonants in a string.
5. Write a program to count the number of uppercase and lowercase letters in a string.
6. Write a program to count digits, alphabets, and special symbols in a string.
7. Write a program to remove all spaces from a string.
8. Write a program to remove vowels from a string.
9. Write a program to print each character of a string on a new line.
10. Write a program to find the length of a string without using len().
11. Write a program to find the frequency of each character in a string.
12. Write a program to find the longest word in a sentence.
13. Write a program to count how many times the word 'the' occurs in a sentence.
14. Write a program to check if a string contains only digits.
15. Write a program to check if a string is alphanumeric.
16. Write a program to convert the first letter of each word to uppercase.
17. Write a program to replace 'is' with 'was' in a sentence.
18. Write a program to check if two strings are anagrams of each other.
19. Write a program to display ASCII values of all characters in a string.
20. Write a program to reverse the order of words in a sentence.
B. List-based Questions
1. Write a program to input n numbers into a list and display them.
2. Write a program to find the sum of all elements of a list.
3. Write a program to find the maximum and minimum value in a list.
4. Write a program to reverse a list using slicing.
5. Write a program to reverse a list without using slicing.
6. Write a program to find the length of a list without using len().
7. Write a program to insert an element at a specific index in a list.
8. Write a program to delete an element by value from a list.
9. Write a program to delete the last element of a list.
10. Write a program to count how many times a particular element occurs in a list.
11. Write a program to remove duplicate elements from a list.
12. Write a program to sort a list in ascending and descending order.
13. Write a program to merge two lists into one.
14. Write a program to find the second largest element in a list.
15. Write a program to swap the first and last elements of a list.
16. Write a program to print only even numbers from a list.
17. Write a program to print only odd numbers from a list.
18. Write a program to create two separate lists of even and odd numbers.
19. Write a program to square each element of a list.
20. Write a program to copy all elements of one list into another.
21. Write a program to input marks of students into a list and find the average.
22. Write a program to print all marks greater than the average.
23. Write a program to input names of students and display the longest name.
24. Write a program to find common elements between two lists.
25. Write a program to remove all negative numbers from a list.
26. Write a program to accept a list of integers and display only prime numbers.
27. Write a program to count positive, negative, and zero elements in a list.
28. Write a program to rotate elements of a list (last element becomes first).
29. Write a program to accept a list of numbers and display only unique numbers.
30. Write a program to generate a list of numbers from 1 to 10 using a loop.