{"id":7032,"date":"2021-05-25T12:20:48","date_gmt":"2021-05-25T06:50:48","guid":{"rendered":"https:\/\/python-programs.com\/?p=7032"},"modified":"2021-11-22T18:38:42","modified_gmt":"2021-11-22T13:08:42","slug":"python-program-to-count-the-number-of-each-vowel","status":"publish","type":"post","link":"https:\/\/python-programs.com\/python-program-to-count-the-number-of-each-vowel\/","title":{"rendered":"Python Program to Count the Number of Each Vowel"},"content":{"rendered":"

Vowels Definition:<\/strong><\/p>\n

A vowel is a sound that you utter with your mouth open, allowing air to pass through it, and is represented in writing by the letters ‘a’, ‘e’, I ‘o’, and ‘u’.<\/p>\n

Examples:<\/strong><\/p>\n

Example1:<\/strong><\/p>\n

Input:<\/strong><\/p>\n

string = \"croyez\"<\/pre>\n

Output:<\/strong><\/p>\n

a : 0\r\ne : 1\r\ni : 0\r\no : 1\r\nu : 0<\/pre>\n

Explanation:<\/strong><\/p>\n

Here the letters o, e are vowels and o is occurred once and e is occurred once<\/pre>\n

Example2:<\/strong><\/p>\n

Input:<\/strong><\/p>\n

string =\"Hello this is BTechGeeks\"<\/pre>\n

Output:<\/strong><\/p>\n

a : 0\r\ne : 4\r\ni : 2\r\no : 1\r\nu : 0<\/pre>\n

Input:<\/strong><\/p>\n

string =\"ELEPHANT\"<\/pre>\n

Output:<\/strong><\/p>\n

a : 1\r\ne : 2\r\ni : 0\r\no : 0\r\nu : 0<\/pre>\n

Explanation:<\/strong><\/p>\n

Here the letters e ,a  are vowels and e is repeated twice and a is repeated once.\r\nHere we ignore the case while counting vowels<\/pre>\n

Count the Number of Each Vowel in Python<\/h2>\n

Below are the ways to count the number of each vowel in given string in Python :<\/p>\n