All Problems
mediumStrings

Count Vowels and Consonants

Problem Statement
Count the number of vowels and consonants in a given string (ignore spaces and special characters).

SAMPLE INPUT

Hello World

SAMPLE OUTPUT

Vowels: 3
Consonants: 7

CONSTRAINTS

  • 1 <= len(s) <= 1000

Explanation: Check each character if it is a vowel or consonant.

Code Editor
Output
Click "Run" to see output...