🔡 Python Program to Count Vowels & Consonants Today I built a simple Python logic to count the number of vowels and consonants in a given string — a fundamental concept for text processing and ...
Day 19: Python Vowel Counter – Build a Simple Function to Count Vowels in Any Text Welcome to Day 19 of the #80DaysOfChallenges journey! Today’s beginner-friendly challenge is all about creating a ...
- This program counts the number of vowels and consonants in a string. - It checks if each character is a letter and whether it is a vowel or consonant.
count_vowels = sum(1 for char in text if char in vowels) count_consonants = sum(1 for char in text if char.isalpha() and char not in vowels) ...