Founding Batch Offer · HLD · LLD · System Design at ₹799 until 30 Nov

ProgramsLogic building

Phase 5 - Category 2: Character Operations

Master character-level string operations.

10 programs · open one, then the next

Start with Print First Character
  1. 01Print First CharacterBeginnerPrint a string's first character safely with indexing. Beginners guard empty input before using index zero and see why leading spaces are real characters.Open example →
  2. 02Print Last CharacterBeginnerAccess the final character of a Python string with negative indexing. Students check for empty input and distinguish index minus one from a one-based position.Open example →
  3. 03Print Each CharacterBeginnerPrint every character of entered text on its own line with Python. Students iterate directly over a string and see how spaces and empty input affect output.Open example →
  4. 04Count Uppercase CharactersBeginnerCount uppercase characters using isupper. Students test characters individually and counting uppercase letters from asking whether an entire string is uppercase.Open example →
  5. 05Count Lowercase CharactersBeginnerCount lowercase characters in a string. Students use islower on individual characters and keep lowercase frequency separate from converting the whole response.Open example →
  6. 06Count Digits in StringBeginnerCount digit characters inside mixed text with isdigit. Students scan a string without int conversion and distinguish this task from counting an integer's places.Open example →
  7. 07Count Special CharactersIntermediateCount special characters but exclude whitespace with Python. Students combine two negated tests and distinguish punctuation from letters, digits, and spaces.Open example →
  8. 08Toggle CaseIntermediateToggle letter case with a character loop. Students choose upper or lower conversions per character and copy digits and punctuation into a new result unchanged.Open example →
  9. 09Remove VowelsIntermediateRemove English vowel characters from text with a loop. Students build a new result from nonmatches and preserve spaces, punctuation, and remaining letter order.Open example →
  10. 10Remove ConsonantsIntermediateRemove consonants while keeping English vowels and nonletters. Students trace an or condition and avoid confusing consonant deletion with keeping vowels only.Open example →