Vowel or Consonant

Easy ⏱ 8 min 75% acceptance ★★★★★ 4.7
Write a function classify_letter(ch) that takes a single lowercase letter ch and returns "Vowel" if it is one of a, e, i, o, u, and "Consonant" otherwise.

Examples

Example 1
Input
classify_letter("e")
Output
"Vowel"
Explanation

"e" is a vowel.

Example 2
Input
classify_letter("k")
Output
"Consonant"
Explanation

"k" is not a vowel.

Constraints

  • ch is a single lowercase alphabetic character.

Topics

Conditional Statementsmembership check

Companies

ZomatoSwiggy

Hints

Hint 1

Use the `in` operator against a string of vowels, e.g. `"aeiou"`.

Hint 2

This avoids five separate `or` comparisons.

Loading the Python runtime… Run executes your code and shows printed output; Submit checks your function against this problem's examples.