Phase 5 - Category 1: Basic String Handling
Master fundamental string operations.
10 programs · open one, then the next
Start with Length of String- 01Length of StringBeginnerFind and print the length of a string.Open example →py# Take string input s = input("Enter a string: ") # Get length
- 02Reverse StringBeginnerReverse a string and print it.Open example →py# Take string input s = input("Enter a string: ") # Reverse string
- 03Convert to UppercaseBeginnerConvert string to uppercase.Open example →py# Take string input s = input("Enter a string: ") # Convert to uppercase
- 04Convert to LowercaseBeginnerConvert string to lowercase.Open example →py# Take string input s = input("Enter a string: ") # Convert to lowercase
- 05Count VowelsBeginnerCount number of vowels in string.Open example →py# Take string input s = input("Enter a string: ") # Count vowels
- 06Count ConsonantsBeginnerCount number of consonants in string.Open example →py# Take string input s = input("Enter a string: ") # Count consonants
- 07Count WordsBeginnerCount number of words in string.Open example →py# Take string input s = input("Enter a string: ") # Count words
- 08Check Palindrome StringBeginnerCheck if string is palindrome.Open example →py# Take string input s = input("Enter a string: ") # Check palindrome
- 09Remove All SpacesBeginnerRemove all spaces from string.Open example →py# Take string input s = input("Enter a string: ") # Remove spaces
- 10Count Each CharacterBeginnerCount frequency of each character.Open example →py# Take string input s = input("Enter a string: ") # Count characters