Vowel and consonant X61040


Statement
 

pdf   zip

html

You have to program the function below.

  • Write a function vowel_consonant(f) that given a list f of strings of lowercase letters, returns two lists. The first one is formed by words in f that finish with a vowel. At the second one there are the words in f finished with a consonant. The order of appearance of the words in each of the two resulting lists must preserve the original order.

Scoring

The function counts 100 points.

Sample session
>>> vowel_consonant(['five', 'six', 'seven', 'one', 'two'])
(['five', 'one', 'two'], ['six', 'seven'])
>>> vowel_consonant(['cow', 'dog', 'cat'])
([], ['cow', 'dog', 'cat'])
>>> vowel_consonant(['blue', 'white'])
(['blue', 'white'], [])
Information
Author
ProAl
Language
English
Official solutions
Python
User solutions
Python