Day 13 of Problem Solving Series In Python | Geethu Talks

Table of Contents
Day 13 of Problem Solving Series
👋 Hi friends! Geethu Talks ki welcome. Mee peru lo entha vowels unnayo telusa? Ee roju Python tho message analyze cheddam.
🎬 Reel chudaledha? Instagram / YouTube lo @GeethuTalks ni follow avvandi.
🧩 Real-life Problem
WhatsApp message lo entha vowels (a, e, i, o, u) unnayo count cheyyali. Capital letters, small letters rendu count avvali.
📋 Task: Message teesukuni, uppercase/lowercase difference lekunda vowels count cheyyandi.
📥 Sample input: Geethu Talks
📤 Sample output: Vowels: 4
📚 Concepts Covered
- 🔤 String ni loop cheyyadam
- 🔡
lower()for case-insensitive check - 🔍
inoperator - 🔢 Counter
🧠 Step 1: Logic Build Cheddam
String lo prathi character ni okkokkati check chestham:
- Message ni lowercase ga marchali
- Prathi character vowels (
"aeiou") lo undha check - Unte count + 1
- Final count print
💡 Analogy: Prathi akshram ni okkokkati touch chesi ‘idi vowel na?’ ani adagadam laga.
💻 Step 2: Python Code
message = input("Enter message: ")
vowels = "aeiou"
count = 0
for ch in message.lower():
if ch in vowels:
count = count + 1
print(f"Vowels: {count}")
✅ Output
Enter message: Geethu Talks
Vowels: 4
🔍 Line by line
| Code | Meaning |
|---|---|
vowels = "aeiou" | Vowels string |
message.lower() | Anni letters small cheyyadam |
for ch in ... | Prathi character okkokkati |
ch in vowels | Character vowels lo undha? |
count = count + 1 | Unte count penchu |
⚠️ Common Mistake Alert
❌ Wrong: lower() marchipothe capital vowels count avvavu
message = "HELLO"
vowels = "aeiou"
count = 0
for ch in message:
if ch in vowels:
count = count + 1
print(count) # should be 2
Result:
0
✅ Right: Loop ki mundu message.lower() vadandi.
💡 Bonus tip: Vowels string lo capital letters kuda rayochu: "aeiouAEIOU". Kani lower() simple.
📝 Quick Recap
- ✔️ String ni character by character loop chesam
- ✔️
intho membership check - ✔️
lower()tho case problem solve
🏋️ Practice Problems
🟢 Easy: ‘banana’ lo ‘a’ entha sarlu vachindi?
Expected output: 3
🟡 Medium: String lo digits entha? (hint: ch.isdigit())
Input: abc123xyz45 → Output: 5
🔴 Challenge: String lo capital letters entha? (hint: ch.isupper())
Input: Geethu Talks Python → Output: 3
💬 Mee answers comments lo share cheyyandi!
🚀 Next: Day 14 – Movie Ticket Seat Layout
Follow @GeethuTalks and stay tuned! 💛
⬅️ Previous: Day 12 of Problem Solving Series In Python
check out our website for more resources
Day 13 of Problem Solving Series Day 13 of Problem Solving Series Day 13 of Problem Solving Series


1 thought on “Day 13 of Problem Solving Series In Python”