Count the vowels · 모음 문자 세기
This page needs a recent browser (with SharedArrayBuffer support). Please update Chrome, Edge, Firefox or Safari to the latest version. · 이 페이지는 최신 브라우저(SharedArrayBuffer 지원)가 필요합니다. Chrome, Edge, Firefox 또는 Safari를 최신 버전으로 업데이트해 주세요.
This one builds on a lesson you haven't finished yet. Do that lesson first: · 이 과제는 아직 완료하지 않은 수업에 기반합니다. 먼저 해당 수업을 완료하세요:
Python Basics · Functions →
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.
Write count_vowels(s): return how many letters in s are vowels (a, e, i, o, u), case-insensitive. · count_vowels(s)를 작성하여 s에 있는 모음(a, e, i, o, u) 문자의 개수(대소문자 구분 없음)를 반환하십시오.
Click Run to see the output here. · 출력을 보려면 '실행'을 클릭하세요.