Vowel Cover X34889


Statement
 

pdf   zip

html

We say that a string s is covered by vowels (it’s vowel_covered) if s is longer than 4, its initial and final positions are uppercase vowels and its second and last but one positions are lowercase vowels. Thus AiaI is not covered by vowels since its length is 4, but AureA is covered by vowels.

Implement the function is_vowel_covered(s) which returns True if a given string s is vowel covered and False otherwise.

Sample session
>>> is_vowel_covered("AaaaA")
True
>>> is_vowel_covered("AaaA")
False
>>> is_vowel_covered("AeioUAeioU")
True
>>> is_vowel_covered("aAppAlAa")
False
>>> is_vowel_covered("AaaaaazZ")
False
Information
Author
InfBesos
Language
English
Other languages
Catalan Spanish
Official solutions
Python
User solutions
Python