Phase 5 - Category 2: Character Operations
Master character-level string operations.
10 programs · open one, then the next
Start with Print First Character- 01Print First CharacterBeginnerPrint first character of string.Open example →py# Take string input s = input("Enter a string: ") # Print first character
- 02Print Last CharacterBeginnerPrint last character of string.Open example →py# Take string input s = input("Enter a string: ") # Print last character
- 03Print Each CharacterBeginnerPrint each character on new line.Open example →py# Take string input s = input("Enter a string: ") # Print each character
- 04Count Uppercase CharactersBeginnerCount uppercase characters in string.Open example →py# Take string input s = input("Enter a string: ") # Count uppercase
- 05Count Lowercase CharactersBeginnerCount lowercase characters in string.Open example →py# Take string input s = input("Enter a string: ") # Count lowercase
- 06Count Digits in StringBeginnerCount digit characters in string.Open example →py# Take string input s = input("Enter a string: ") # Count digits
- 07Count Special CharactersIntermediateCount special characters in string.Open example →py# Take string input s = input("Enter a string: ") # Count special characters
- 08Toggle CaseIntermediateToggle case of each character.Open example →py# Take string input s = input("Enter a string: ") # Toggle case
- 09Remove VowelsIntermediateRemove all vowels from string.Open example →py# Take string input s = input("Enter a string: ") # Remove vowels
- 10Remove ConsonantsIntermediateRemove all consonants from string.Open example →py# Take string input s = input("Enter a string: ") # Remove consonants