Challenge 27

🅰️

Count Vowels

Open in Code Editor or Copy Instructions
...solutions at bottom of page...

Create a procedure to take in a string parameter and output the number of vowels (a, e, i, o, u) and other non-vowel alphanumeric characters (b, c, d, 0, 1, 2 etc)

Spaces and punctuation should be ignored and your program should treat uppercase and lowercase as being equivalents

Examples:

countVowels("hello, world") should print:

a: 0

e: 1

i: 0

o: 2

u: 0

others: 7

Extension:

Output the vowels in order of most to least frequest

Solutions

IGCSE 0478 / O-Level 2210 A-Level 9618