Practical Record Programming Problems
STRINGS
1. Write a Python program to concatenate two strings and assign it in another string using + operator.
2. Write a Python code to input a string and count total number of characters available in the
string without using len ( ) function.
3. Write a Python program to check whether a string contains digits or not.
4. Write a Python program to find the frequency of each character in a given string without
using count( ) method.
5. Write a Python program to input a string and find total number of uppercase and lowercase letters.
6. Write a Python program to count occurrence of a word in the input string without using
count( ) method.
7. Write a Python program to input a string and print each individual word of it along with its length.
8. Write a Python program to input a string and count the number of vowels and consonants.
9. Write a menu-based program in Python to input a string and display:
1. The number of uppercase letters in a string
2. The number of lowercase letters in a string
3. The number of digits in a string
4. The number of whitespaces in the string.
10. Write a Python code to count only digits available in the input string.
11. Write a Python code to input a string and display string with capital letter of each word. For
example, if the input string is welcome to web world then output string should be Welcome
To Web World.
11. Write a Python program to count total number of words available in the input string.
12. Write a Python program to input a string and display only those words whose length is
less than 5 characters.
13. Write a Python program to input a string and display only those words from the string which
are starting from alphabet ‘a’ or ‘A’.
14. Write a Python program to input a string and display the largest word from the string.
15. Write a Python program to input a string and replace all spaces by “#” symbol.
16. Write a Python program to print the characters present at even index and odd index separately for
the input string.
17. Write a Python program to check whether the given string is palindrome or not?