Skip to content · ⁨コンテンツへスキップ⁩

Count the vowels · ⁨母音の数を数える⁩

Count the vowels

Count how many characters of a string are vowels — a, e, i, o, u — treating capitals and lowercase the same.

Lowercase the string first with s.lower() so you only have five letters to check. The expression ch in "aeiou" is True when ch is one of them.

Log in or create account · ⁨ログインまたはアカウント作成⁩

IGCSE, A-Level & AP